DEV: linting
This commit is contained in:
@@ -21,21 +21,29 @@ export default Ember.Component.extend({
|
||||
$(fileInput).on("change", () => this.fileSelected(fileInput.files));
|
||||
|
||||
$this.on("dragover", (e) => {
|
||||
if (e.preventDefault) e.preventDefault();
|
||||
if (e.preventDefault) {
|
||||
e.preventDefault();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$this.on("dragenter", (e) => {
|
||||
if (e.preventDefault) e.preventDefault();
|
||||
if (e.preventDefault) {
|
||||
e.preventDefault();
|
||||
}
|
||||
this.set("hover", this.hover + 1);
|
||||
return false;
|
||||
});
|
||||
$this.on("dragleave", (e) => {
|
||||
if (e.preventDefault) e.preventDefault();
|
||||
if (e.preventDefault) {
|
||||
e.preventDefault();
|
||||
}
|
||||
this.set("hover", this.hover - 1);
|
||||
return false;
|
||||
});
|
||||
$this.on("drop", (e) => {
|
||||
if (e.preventDefault) e.preventDefault();
|
||||
if (e.preventDefault) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
this.set("hover", 0);
|
||||
this.fileSelected(e.dataTransfer.files);
|
||||
|
||||
@@ -101,7 +101,9 @@ export default Ember.Component.extend({
|
||||
return !!this.site.categories.find((c) => c.id === intVal);
|
||||
} else if (/\//.test(value)) {
|
||||
const match = /(.*)\/(.*)/.exec(value);
|
||||
if (!match) return false;
|
||||
if (!match) {
|
||||
return false;
|
||||
}
|
||||
const result = Category.findBySlug(
|
||||
match[2].dasherize(),
|
||||
match[1].dasherize()
|
||||
|
||||
Reference in New Issue
Block a user