Skip to content

Commit 1623a22

Browse files
committed
MAGETWO-81311: Check the length of the array before attempting to slice it. Slicing an array of one will create an empty result. Issue: 9944
1 parent 4d26093 commit 1623a22

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/Ui/view/base/web/js/form/element

1 file changed

+1
-1
lines changed

app/code/Magento/Ui/view/base/web/js/form/element/abstract.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ define([
119119
this._super();
120120

121121
scope = this.dataScope;
122-
name = scope.split('.').slice(1);
122+
name = (scope.split('.').length > 1) ? scope.split('.').slice(1) : scope.split('.');
123123

124124
valueUpdate = this.showFallbackReset ? 'afterkeydown' : this.valueUpdate;
125125

0 commit comments

Comments
 (0)