From e78ecc890d329aa824ffc86cb894a1f7a4cec124 Mon Sep 17 00:00:00 2001 From: Nicolas Arias Date: Fri, 8 Apr 2016 07:32:44 -0500 Subject: [PATCH] Proposed fix for issue 590 Reset keyRedaction variable so that the parent's keyRedaction will not be carried onto its children which used to cause the key to be an empty array inside the ngModel builder. --- src/services/builder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/builder.js b/src/services/builder.js index 69a93a15c..e6adf8e40 100644 --- a/src/services/builder.js +++ b/src/services/builder.js @@ -133,7 +133,7 @@ angular.module('schemaForm').provider('sfBuilder', ['sfPathProvider', function(s var items = args.fieldFrag.querySelector('[schema-form-array-items]'); if (items) { state = angular.copy(args.state); - state.keyRedaction = state.keyRedaction || 0; + state.keyRedaction = 0; state.keyRedaction += args.form.key.length + 1; // Special case, an array with just one item in it that is not an object.