mirror of
https://github.com/flarum/core.git
synced 2025-08-10 10:24:46 +02:00
Fix JSHint errors
This commit is contained in:
@@ -19,9 +19,9 @@ export default Ember.Component.extend({
|
||||
click: function(e) {
|
||||
e.preventDefault();
|
||||
var action = this.get('action');
|
||||
if (typeof action == 'string') {
|
||||
if (typeof action === 'string') {
|
||||
this.sendAction('action');
|
||||
} else if (typeof action == 'function') {
|
||||
} else if (typeof action === 'function') {
|
||||
action();
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,3 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
import DropdownButton from './dropdown-button';
|
||||
|
||||
export default DropdownButton.extend({
|
||||
|
@@ -7,10 +7,12 @@ export default Ember.Component.extend({
|
||||
layoutName: 'components/ui/controls/item-list',
|
||||
|
||||
listItems: function() {
|
||||
if (!Ember.isArray(this.get('items'))) return [];
|
||||
if (!Ember.isArray(this.get('items'))) {
|
||||
return [];
|
||||
}
|
||||
var listItems = [];
|
||||
this.get('items').forEach(function(item) {
|
||||
if (item.tagName != 'li') {
|
||||
if (item.tagName !== 'li') {
|
||||
item = ComponentItem.extend({component: item});
|
||||
}
|
||||
listItems.push(item);
|
||||
|
@@ -9,7 +9,7 @@ export default Ember.Component.extend({
|
||||
didInsertElement: function() {
|
||||
var self = this;
|
||||
this.$().find('input').on('keydown', function(e) {
|
||||
if (e.which == 27) {
|
||||
if (e.which === 27) {
|
||||
self.clear();
|
||||
}
|
||||
});
|
||||
@@ -18,7 +18,7 @@ export default Ember.Component.extend({
|
||||
}).on('click', function(e) {
|
||||
e.preventDefault();
|
||||
self.clear();
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
clear: function() {
|
||||
|
Reference in New Issue
Block a user