Fix miscellaneous deprecated methods [MAILPOET-3386]

This commit is contained in:
wxa
2021-02-18 19:07:36 +03:00
committed by Veljko V
parent be320ad995
commit 3b12ea0989
3 changed files with 4 additions and 4 deletions

View File

@@ -79,7 +79,7 @@ $.fn.mailpoetSerializeObject = function (coerce) { // eslint-disable-line func-n
: val; : val;
cur = cur[key]; cur = cur[key];
} }
} else if ($.isArray(obj[key])) { } else if (Array.isArray(obj[key])) {
// val is already an array, so push on the next value. // val is already an array, so push on the next value.
obj[key].push(val); obj[key].push(val);
} else if (obj[key] !== undefined) { } else if (obj[key] !== undefined) {

View File

@@ -231,8 +231,8 @@ MailPoet.Modal = {
return this; return this;
}, },
removeEvents: function () { removeEvents: function () {
jQuery(document).unbind('keyup.mailpoet_modal'); jQuery(document).off('keyup.mailpoet_modal');
jQuery(window).unbind('resize.mailpoet_modal'); jQuery(window).off('resize.mailpoet_modal');
jQuery('#mailpoet_modal_close').off('click'); jQuery('#mailpoet_modal_close').off('click');
if (this.options.overlay === true) { if (this.options.overlay === true) {
jQuery('#mailpoet_modal_overlay').off('click'); jQuery('#mailpoet_modal_overlay').off('click');

View File

@@ -183,7 +183,7 @@ MailPoet.Notice = {
if (all !== undefined && all === true) { if (all !== undefined && all === true) {
// all notices // all notices
jQuery('.mailpoet_notice:not([id])').trigger('close'); jQuery('.mailpoet_notice:not([id])').trigger('close');
} else if (all !== undefined && jQuery.isArray(all)) { } else if (all !== undefined && Array.isArray(all)) {
// array of ids // array of ids
Object.keys(all).forEach(function close(id) { Object.keys(all).forEach(function close(id) {
jQuery('[data-id="' + all[id] + '"]').trigger('close'); jQuery('[data-id="' + all[id] + '"]').trigger('close');