diff --git a/assets/js/src/handlebars_helpers.js b/assets/js/src/handlebars_helpers.js
index 1d92825ec9..14498ab432 100644
--- a/assets/js/src/handlebars_helpers.js
+++ b/assets/js/src/handlebars_helpers.js
@@ -24,7 +24,7 @@ define('handlebars_helpers', ['handlebars'], function (Handlebars) {
// set date format
f = block.hash.format || 'MMM Do, YYYY';
// check if we passed a timestamp
- if (/^\d+$/.test(timestamp)) {
+ if (/^\s*\d+\s*$/.test(timestamp)) {
return window.moment.unix(timestamp).format(f);
}
return window.moment.utc(timestamp).format(f);
diff --git a/assets/js/src/mp2migrator.js b/assets/js/src/mp2migrator.js
index cc5be0cc29..e770de3aca 100644
--- a/assets/js/src/mp2migrator.js
+++ b/assets/js/src/mp2migrator.js
@@ -46,8 +46,10 @@ define('mp2migrator', ['mailpoet', 'jquery'], function (mp, jQuery) {
jQuery('#logger').append('' + MailPoet.MP2Migrator.fatal_error + '' + '
\n');
}).always(function () {
if (MailPoet.MP2Migrator.is_logging) {
- MailPoet.MP2Migrator.displayLogs_timeout
- = setTimeout(MailPoet.MP2Migrator.displayLogs, 1000);
+ MailPoet.MP2Migrator.displayLogs_timeout = setTimeout(
+ MailPoet.MP2Migrator.displayLogs,
+ 1000
+ );
}
});
},
@@ -71,8 +73,10 @@ define('mp2migrator', ['mailpoet', 'jquery'], function (mp, jQuery) {
jQuery('#logger-container').show();
}
if (MailPoet.MP2Migrator.is_logging) {
- MailPoet.MP2Migrator.updateProgressbar_timeout
- = setTimeout(MailPoet.MP2Migrator.updateProgressbar, 1000);
+ MailPoet.MP2Migrator.updateProgressbar_timeout = setTimeout(
+ MailPoet.MP2Migrator.updateProgressbar,
+ 1000
+ );
}
});
},
diff --git a/assets/js/src/newsletter_editor/behaviors/ContainerDropZoneBehavior.js b/assets/js/src/newsletter_editor/behaviors/ContainerDropZoneBehavior.js
index 378fcd5d70..aeb24584ca 100644
--- a/assets/js/src/newsletter_editor/behaviors/ContainerDropZoneBehavior.js
+++ b/assets/js/src/newsletter_editor/behaviors/ContainerDropZoneBehavior.js
@@ -20,9 +20,10 @@ define([
columnLimit: 3
},
onRender: function () {
- var dragAndDropDisabled =
+ var dragAndDropDisabled = (
_.isObject(this.view.options.renderOptions)
- && this.view.options.renderOptions.disableDragAndDrop === true;
+ && this.view.options.renderOptions.disableDragAndDrop === true
+ );
if (!dragAndDropDisabled) {
this.addDropZone();
}
diff --git a/assets/js/src/subscribers/importExport/import.js b/assets/js/src/subscribers/importExport/import.js
index 3b3e3814eb..04e5eedba8 100644
--- a/assets/js/src/subscribers/importExport/import.js
+++ b/assets/js/src/subscribers/importExport/import.js
@@ -247,9 +247,12 @@ define(
// if the header options is set, there should be at least
// 2 data rows, otherwise at least 1 data row
if (
- (processedSubscribers && (isHeaderFound && processedSubscribers.length >= 2))
- ||
- (!isHeaderFound && processedSubscribers.length >= 1)
+ processedSubscribers &&
+ (
+ (isHeaderFound && processedSubscribers.length >= 2)
+ ||
+ (!isHeaderFound && processedSubscribers.length >= 1)
+ )
) {
// since we assume that the header line is always present, we need
// to detect the header by checking if it contains a valid e-mail address