From 15ff4d2556a18d7e0d2fca1e90d126f3e9f19e8f Mon Sep 17 00:00:00 2001 From: Angelo Maragna Date: Wed, 25 Jul 2018 14:50:49 +0100 Subject: [PATCH 1/2] Update template.js Uniform jquery variable to "$" as this javascript is partially using "jquery" and partially "$". The line 62 will cause an error in Internet Explorer if $ is not declared. --- lib/web/mage/utils/template.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/web/mage/utils/template.js b/lib/web/mage/utils/template.js index 619f93229f61a..5bf9e6a4d8ad5 100644 --- a/lib/web/mage/utils/template.js +++ b/lib/web/mage/utils/template.js @@ -7,7 +7,7 @@ define([ 'underscore', 'mage/utils/objects', 'mage/utils/strings' -], function (jQuery, _, utils, stringUtils) { +], function ($, _, utils, stringUtils) { 'use strict'; var tmplSettings = _.templateSettings, @@ -172,7 +172,7 @@ define([ if (isTemplate(value)) { list[key] = render(value, tmpl, castString); - } else if (jQuery.isPlainObject(value) || Array.isArray(value)) { + } else if ($.isPlainObject(value) || Array.isArray(value)) { _.each(value, iterate); } }); From 24f87ccfdbaa60018be708d83729b4c5cf4845b4 Mon Sep 17 00:00:00 2001 From: Volodymyr Zaets Date: Tue, 31 Jul 2018 12:40:29 +0300 Subject: [PATCH 2/2] [Backport] Update template.js #17202 Add suppress warning --- lib/web/mage/utils/template.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/web/mage/utils/template.js b/lib/web/mage/utils/template.js index 5bf9e6a4d8ad5..add59bdb1448e 100644 --- a/lib/web/mage/utils/template.js +++ b/lib/web/mage/utils/template.js @@ -2,6 +2,9 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +/* eslint-disable no-shadow */ + define([ 'jquery', 'underscore',