Skip to content

Commit 59d3e60

Browse files
MAGETWO-87935: #13685: Replaced .size() with .length to be compatible with jQuery 3.* #13686
- Merge Pull Request #13686 from kirmorozov/magento2:2.3-develop-13685 - Merged commits: 1. 52875a8
2 parents 83ada52 + 52875a8 commit 59d3e60

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ define([
9090
$title,
9191
$corner;
9292

93-
if (!$element.size()) {
93+
if (!$element.length) {
9494
$element = $('<div class="' +
9595
$widget.options.tooltipClass +
9696
'"><div class="image"></div><div class="title"></div><div class="corner"></div></div>'
@@ -810,7 +810,7 @@ define([
810810
$widget._Rewind(controls);
811811

812812
// done if nothing selected
813-
if (selected.size() <= 0) {
813+
if (selected.length <= 0) {
814814
return;
815815
}
816816

@@ -820,7 +820,7 @@ define([
820820
id = $this.attr('attribute-id'),
821821
products = $widget._CalcProducts(id);
822822

823-
if (selected.size() === 1 && selected.first().attr('attribute-id') === id) {
823+
if (selected.length === 1 && selected.first().attr('attribute-id') === id) {
824824
return;
825825
}
826826

@@ -1016,7 +1016,7 @@ define([
10161016
_EnableProductMediaLoader: function ($this) {
10171017
var $widget = this;
10181018

1019-
if ($('body.catalog-product-view').size() > 0) {
1019+
if ($('body.catalog-product-view').length > 0) {
10201020
$this.parents('.column.main').find('.photo.image')
10211021
.addClass($widget.options.classes.loader);
10221022
} else {
@@ -1035,7 +1035,7 @@ define([
10351035
_DisableProductMediaLoader: function ($this) {
10361036
var $widget = this;
10371037

1038-
if ($('body.catalog-product-view').size() > 0) {
1038+
if ($('body.catalog-product-view').length > 0) {
10391039
$this.parents('.column.main').find('.photo.image')
10401040
.removeClass($widget.options.classes.loader);
10411041
} else {

0 commit comments

Comments
 (0)