diff --git a/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js b/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js index d1f7c477ba8d7..a24c72c473fe9 100644 --- a/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js +++ b/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js @@ -90,7 +90,7 @@ define([ $title, $corner; - if (!$element.size()) { + if (!$element.length) { $element = $('
' @@ -810,7 +810,7 @@ define([ $widget._Rewind(controls); // done if nothing selected - if (selected.size() <= 0) { + if (selected.length <= 0) { return; } @@ -820,7 +820,7 @@ define([ id = $this.attr('attribute-id'), products = $widget._CalcProducts(id); - if (selected.size() === 1 && selected.first().attr('attribute-id') === id) { + if (selected.length === 1 && selected.first().attr('attribute-id') === id) { return; } @@ -1016,7 +1016,7 @@ define([ _EnableProductMediaLoader: function ($this) { var $widget = this; - if ($('body.catalog-product-view').size() > 0) { + if ($('body.catalog-product-view').length > 0) { $this.parents('.column.main').find('.photo.image') .addClass($widget.options.classes.loader); } else { @@ -1035,7 +1035,7 @@ define([ _DisableProductMediaLoader: function ($this) { var $widget = this; - if ($('body.catalog-product-view').size() > 0) { + if ($('body.catalog-product-view').length > 0) { $this.parents('.column.main').find('.photo.image') .removeClass($widget.options.classes.loader); } else {