Skip to content

Commit bc4503e

Browse files
committed
Surround with a check since its not available in 1.2
1 parent 52816d3 commit bc4503e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/directives/array.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ angular.module('schemaForm').directive('sfArray', ['sfSelect', 'schemaForm', 'sf
130130
if (scope.validateArray) {
131131
scope.validateArray();
132132
}
133-
ngModel.$setDirty();
133+
134+
// Angular 1.2 lacks setDirty
135+
if (ngModel.$setDirty) {
136+
ngModel.$setDirty();
137+
}
134138
return list;
135139
};
136140

0 commit comments

Comments
 (0)