Fix eslint no-lonely-if in es5 files
[MAILPOET-1145]
This commit is contained in:
@ -33,7 +33,6 @@
|
||||
"wrap-iife": 0,
|
||||
"no-plusplus": 0,
|
||||
"default-case": 0,
|
||||
"no-lonely-if": 0,
|
||||
"brace-style": 0,
|
||||
"space-infix-ops": 0
|
||||
}
|
||||
|
@ -155,16 +155,14 @@ define('date',
|
||||
if (escapeToken === true) {
|
||||
convertedFormat.push('[' + token + ']');
|
||||
escapeToken = false;
|
||||
} else {
|
||||
if (token === '\\') {
|
||||
} else if (token === '\\') {
|
||||
// Slash escapes the next symbol to be treated as literal
|
||||
escapeToken = true;
|
||||
continue;
|
||||
} else if (replacements[token] !== undefined) {
|
||||
convertedFormat.push(replacements[token]);
|
||||
} else {
|
||||
convertedFormat.push('[' + token + ']');
|
||||
}
|
||||
escapeToken = true;
|
||||
continue;
|
||||
} else if (replacements[token] !== undefined) {
|
||||
convertedFormat.push(replacements[token]);
|
||||
} else {
|
||||
convertedFormat.push('[' + token + ']');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -582,11 +582,9 @@ WysijaForm = {
|
||||
|
||||
if (window.isRtl) {
|
||||
if (WysijaForm.toolbar.left === null) WysijaForm.toolbar.left = 0;
|
||||
} else {
|
||||
if (WysijaForm.toolbar.left === null) {
|
||||
WysijaForm.toolbar.left =
|
||||
} else if (WysijaForm.toolbar.left === null) {
|
||||
WysijaForm.toolbar.left =
|
||||
parseInt(window.$(WysijaForm.options.container).positionedOffset().left);
|
||||
}
|
||||
}
|
||||
if (WysijaForm.toolbar.x === null) {
|
||||
WysijaForm.toolbar.x =
|
||||
|
@ -80,21 +80,16 @@ define(
|
||||
: val;
|
||||
cur = cur[key];
|
||||
}
|
||||
} else if ($.isArray(obj[key])) {
|
||||
// val is already an array, so push on the next value.
|
||||
obj[key].push(val);
|
||||
} else if (obj[key] !== undefined) {
|
||||
// val isn't an array, but since a second value has been specified,
|
||||
// convert val into an array.
|
||||
obj[key] = [obj[key], val];
|
||||
} else {
|
||||
// Simple key, even simpler rules, since only scalars and shallow
|
||||
// arrays are allowed.
|
||||
|
||||
if ($.isArray(obj[key])) {
|
||||
// val is already an array, so push on the next value.
|
||||
obj[key].push(val);
|
||||
} else if (obj[key] !== undefined) {
|
||||
// val isn't an array, but since a second value has been specified,
|
||||
// convert val into an array.
|
||||
obj[key] = [obj[key], val];
|
||||
} else {
|
||||
// val is a scalar.
|
||||
obj[key] = val;
|
||||
}
|
||||
// val is a scalar.
|
||||
obj[key] = val;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -559,10 +559,8 @@ define('modal', ['mailpoet', 'jquery'],
|
||||
.subpanels[(this.subpanels.length - 1)]
|
||||
.onSuccess(this.subpanels[(this.subpanels.length - 1)].data);
|
||||
}
|
||||
} else {
|
||||
if (this.options.onSuccess !== null) {
|
||||
this.options.onSuccess(this.options.data);
|
||||
}
|
||||
} else if (this.options.onSuccess !== null) {
|
||||
this.options.onSuccess(this.options.data);
|
||||
}
|
||||
this.close();
|
||||
|
||||
@ -575,10 +573,8 @@ define('modal', ['mailpoet', 'jquery'],
|
||||
.subpanels[(this.subpanels.length - 1)]
|
||||
.onCancel(this.subpanels[(this.subpanels.length - 1)].data);
|
||||
}
|
||||
} else {
|
||||
if (this.options.onCancel !== null) {
|
||||
this.options.onCancel(this.options.data);
|
||||
}
|
||||
} else if (this.options.onCancel !== null) {
|
||||
this.options.onCancel(this.options.data);
|
||||
}
|
||||
this.close();
|
||||
|
||||
|
Reference in New Issue
Block a user