Skip to content

Commit 84a457b

Browse files
authored
MC-41987: Fix jQuery.isFunction() (#39)
* MC-41987: Fix jQuery.isFunction() - Replace isFunction() * MC-41987: Fix jQuery.isFunction() - Replace isFunction()
1 parent 3734a9e commit 84a457b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

app/code/Magento/Catalog/view/adminhtml/web/catalog/product-attributes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ define([
4747
closed: function () {
4848
var doc = self.iframe.get(0).document;
4949

50-
if (doc && $.isFunction(doc.execCommand)) {
50+
if (doc && typeof doc.execCommand === 'function') {
5151
//IE9 break script loading but not execution on iframe removing
5252
doc.execCommand('stop');
5353
self.iframe.remove();

app/code/Magento/Checkout/view/frontend/web/js/model/address-converter.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ define([
9999
customAttributesObject;
100100

101101
$.each(addrs, function (key) {
102-
if (addrs.hasOwnProperty(key) && !$.isFunction(addrs[key])) {
102+
if (addrs.hasOwnProperty(key) && typeof addrs[key] !== 'function') {
103103
output[self.toUnderscore(key)] = addrs[key];
104104
}
105105
});

lib/web/mage/backend/validation.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ define([
9999
* @param {HTMLElement} element
100100
*/
101101
highlight: function (element) {
102-
if ($.validator.defaults.highlight && $.isFunction($.validator.defaults.highlight)) {
102+
if ($.validator.defaults.highlight && typeof $.validator.defaults.highlight === 'function') {
103103
$.validator.defaults.highlight.apply(this, arguments);
104104
}
105105
$(element).trigger('highlight.validate');
@@ -109,7 +109,7 @@ define([
109109
* @param {HTMLElement} element
110110
*/
111111
unhighlight: function (element) {
112-
if ($.validator.defaults.unhighlight && $.isFunction($.validator.defaults.unhighlight)) {
112+
if ($.validator.defaults.unhighlight && typeof $.validator.defaults.unhighlight === 'function') {
113113
$.validator.defaults.unhighlight.apply(this, arguments);
114114
}
115115
$(element).trigger('unhighlight.validate');

0 commit comments

Comments
 (0)