Fix no-else-return eslint rule in ES5 files

[MAILPOET-1144]
This commit is contained in:
Pavel Dohnal
2017-11-29 15:04:38 +00:00
parent 3d2a433df1
commit 159e946093
9 changed files with 51 additions and 52 deletions

View File

@@ -25,12 +25,12 @@ define('handlebars_helpers', ['handlebars'], function (Handlebars) {
// check if we passed a timestamp
if (parseInt(timestamp, 10) == timestamp) {
return window.moment.unix(timestamp).format(f);
} else {
return window.moment.utc(timestamp).format(f);
}
} else {
return timestamp;
return window.moment.utc(timestamp).format(f);
}
return timestamp;
});
Handlebars.registerHelper('cycle', function (value, block) {
@@ -87,9 +87,9 @@ define('handlebars_helpers', ['handlebars'], function (Handlebars) {
var mailtoMatchingRegex = /^mailto\:/i;
if (typeof value === 'string' && value.match(mailtoMatchingRegex)) {
return value.replace(mailtoMatchingRegex, '');
} else {
return value;
}
return value;
});
Handlebars.registerHelper('lookup', function (obj, field) {
return obj && obj[field];
@@ -134,9 +134,9 @@ define('handlebars_helpers', ['handlebars'], function (Handlebars) {
}
if (sanitized.length > limit) {
return sanitized.substr(0, limit - strAppend.length) + strAppend;
} else {
return sanitized;
}
return sanitized;
});
Handlebars.registerHelper('getNumber', function (string) {