Fix miscellaneous deprecated methods [MAILPOET-3386]
This commit is contained in:
@@ -79,7 +79,7 @@ $.fn.mailpoetSerializeObject = function (coerce) { // eslint-disable-line func-n
|
||||
: val;
|
||||
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.
|
||||
obj[key].push(val);
|
||||
} else if (obj[key] !== undefined) {
|
||||
|
@@ -231,8 +231,8 @@ MailPoet.Modal = {
|
||||
return this;
|
||||
},
|
||||
removeEvents: function () {
|
||||
jQuery(document).unbind('keyup.mailpoet_modal');
|
||||
jQuery(window).unbind('resize.mailpoet_modal');
|
||||
jQuery(document).off('keyup.mailpoet_modal');
|
||||
jQuery(window).off('resize.mailpoet_modal');
|
||||
jQuery('#mailpoet_modal_close').off('click');
|
||||
if (this.options.overlay === true) {
|
||||
jQuery('#mailpoet_modal_overlay').off('click');
|
||||
|
@@ -183,7 +183,7 @@ MailPoet.Notice = {
|
||||
if (all !== undefined && all === true) {
|
||||
// all notices
|
||||
jQuery('.mailpoet_notice:not([id])').trigger('close');
|
||||
} else if (all !== undefined && jQuery.isArray(all)) {
|
||||
} else if (all !== undefined && Array.isArray(all)) {
|
||||
// array of ids
|
||||
Object.keys(all).forEach(function close(id) {
|
||||
jQuery('[data-id="' + all[id] + '"]').trigger('close');
|
||||
|
Reference in New Issue
Block a user