Fix public.js to follow eslint rules
[MAILPOET-1567]
This commit is contained in:
@@ -62,18 +62,21 @@ function ( // eslint-disable-line func-names
|
||||
endpoint: 'subscribers',
|
||||
action: 'subscribe',
|
||||
data: formData.data
|
||||
}).fail(function (response) { // eslint-disable-line func-names
|
||||
})
|
||||
.fail(function handleFailedPost(response) {
|
||||
form.find('.mailpoet_validate_error').html(
|
||||
response.errors.map(function (error) { // eslint-disable-line func-names
|
||||
response.errors.map(function buildErrorMessage(error) {
|
||||
return error.message;
|
||||
}).join('<br />')
|
||||
).show();
|
||||
}).done(function (response) { // eslint-disable-line func-names
|
||||
})
|
||||
.done(function handleRecaptcha(response) {
|
||||
if (window.grecaptcha && formData.recaptcha) {
|
||||
window.grecaptcha.reset(formData.recaptcha);
|
||||
}
|
||||
return response;
|
||||
}).done(function (response) { // eslint-disable-line func-names
|
||||
})
|
||||
.done(function handleSuccess(response) {
|
||||
// successfully subscribed
|
||||
if (
|
||||
response.meta !== undefined
|
||||
@@ -104,7 +107,6 @@ function ( // eslint-disable-line func-names
|
||||
MailPoet.Iframe.autoSize(window.frameElement);
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user