Fix modules with "return" outside of function

[MAILPOET-1829]
This commit is contained in:
Jan Jakeš
2019-02-19 17:31:14 +01:00
committed by M. Shull
parent afcde00003
commit 112d780de5
2 changed files with 6 additions and 8 deletions

View File

@@ -3,10 +3,7 @@ import jQuery from 'jquery';
import mp from 'mailpoet';
var MailPoet = mp;
if (jQuery('#mailpoet_settings').length === 0) {
return;
}
if (jQuery('#mailpoet_settings').length > 0) {
MailPoet.Router = new (Backbone.Router.extend({
routes: {
'': 'defaultRoute',
@@ -79,3 +76,4 @@ import mp from 'mailpoet';
jQuery(document).ready(function () { // eslint-disable-line func-names
if (!Backbone.History.started) Backbone.history.start();
});
}

View File

@@ -3,15 +3,15 @@ import jQuery from 'jquery';
import MailPoet from 'mailpoet';
import Handlebars from 'handlebars';
if (!jQuery('#mailpoet_subscribers_export').length) {
return;
}
jQuery(document).ready(function documentReady() {
var segmentsContainerElement;
var subscriberFieldsContainerElement;
var nextStepButton;
var renderSegmentsAndFields;
var subscribersExportTemplate;
if (!jQuery('#mailpoet_subscribers_export').length) {
return;
}
if (!window.exportData.segments) {
return;
}