Skip to content

Commit ff1be9c

Browse files
committed
AC-1963: Fix deprecated jquery code in magento2 CE
- Fixed static tests
1 parent b3dc9ee commit ff1be9c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/web/mage/backend/form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ define([
125125
return this._buildURL(this.oldAttributes.action, data.args);
126126
}
127127

128-
return (typeof data === 'string') ? data : this.oldAttributes.action;
128+
return typeof data === 'string' ? data : this.oldAttributes.action;
129129
},
130130

131131
/**

lib/web/mage/backend/suggest.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ define([
603603
this.element.addClass(this.options.loadingClass);
604604

605605
if (this.options.delay) {
606-
if (typeof (this.options.data) !== 'undefined') {
606+
if (typeof this.options.data !== 'undefined') {
607607
response(this.filter(this.options.data, term));
608608
}
609609
clearTimeout(this._searchTimeout);
@@ -707,7 +707,7 @@ define([
707707

708708
if (Array.isArray(o.source)) {
709709
response(this.filter(o.source, term));
710-
} else if (typeof (o.source) === 'string') {
710+
} else if (typeof o.source === 'string') {
711711
ajaxData = {};
712712
ajaxData[this.options.termAjaxArgument] = term;
713713

@@ -721,7 +721,7 @@ define([
721721
response.apply(response, arguments);
722722
}, this)
723723
}, o.ajaxOptions || {}));
724-
} else if (typeof (o.source) === 'function') {
724+
} else if (typeof o.source === 'function') {
725725
o.source.apply(o.source, arguments);
726726
}
727727
},

0 commit comments

Comments
 (0)