From 60f47fcffc5dd49e2f57e930000c7b196b3770f6 Mon Sep 17 00:00:00 2001 From: angelo983 Date: Wed, 20 Sep 2017 19:47:26 +0200 Subject: [PATCH] Update arrays.js --- lib/web/mage/utils/arrays.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web/mage/utils/arrays.js b/lib/web/mage/utils/arrays.js index 45bf383f5e79a..795c0834e863a 100644 --- a/lib/web/mage/utils/arrays.js +++ b/lib/web/mage/utils/arrays.js @@ -101,7 +101,7 @@ define([ newIndex, target; - if (typeof position === 'undefined') { + if (typeof position === 'undefined' || position == null) { position = -1; } else if (typeof position === 'string') { position = isNaN(+position) ? position : +position;