Skip to content

Commit a1e3d65

Browse files
committed
gulped
1 parent 56220b4 commit a1e3d65

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

dist/schema-form.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1520,6 +1520,10 @@ angular.module('schemaForm').directive('sfArray', ['sfSelect', 'schemaForm', 'sf
15201520
// It's the (first) array part of the key, '[]' that needs a number
15211521
// corresponding to an index of the form.
15221522
var once = scope.$watch(attrs.sfArray, function(form) {
1523+
if (!form) {
1524+
return;
1525+
}
1526+
15231527

15241528
// An array model always needs a key so we know what part of the model
15251529
// to look at. This makes us a bit incompatible with JSON Form, on the
@@ -1529,7 +1533,8 @@ angular.module('schemaForm').directive('sfArray', ['sfSelect', 'schemaForm', 'sf
15291533
// We only modify the same array instance but someone might change the array from
15301534
// the outside so let's watch for that. We use an ordinary watch since the only case
15311535
// we're really interested in is if its a new instance.
1532-
scope.$watch('model' + sfPath.normalize(form.key), function(value) {
1536+
var key = sfPath.normalize(form.key);
1537+
scope.$watch('model' + (key[0] !== '[' ? '.' : '') + key, function(value) {
15331538
list = scope.modelArray = value;
15341539
});
15351540

0 commit comments

Comments
 (0)