Skip to content
This repository was archived by the owner on Apr 30, 2018. It is now read-only.

Commit e95294b

Browse files
author
Kent C. Dodds
committed
fix(formly-field): Skip if it doesn't exist (Angular 1.2)
closes #448
1 parent 8714d71 commit e95294b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/directives/formly-field.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ function formlyField($http, $q, $compile, $templateCache, $interpolate, formlyCo
168168
}
169169

170170
formControl.$render();
171-
formControl.$setUntouched();
171+
// REMOVE UNDEFINED CHECK WHEN DROPPING ANGULAR 1.2 SUPPORT
172+
formControl.$setUntouched && formControl.$setUntouched();
172173
formControl.$setPristine();
173174

174175
// To prevent breaking change requiring a digest to reset $viewModel

0 commit comments

Comments
 (0)