Skip to content

Commit

Permalink
Merge pull request #99 from rumitparakhiya/master
Browse files Browse the repository at this point in the history
Fix: Call to reset() method fails when form contains radio buttons
  • Loading branch information
Jakobovski authored Aug 19, 2016
2 parents 9b1b176 + 1024fd4 commit dbca40c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/angular-validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ angular.module('angularValidator').directive('angularValidator', ['$injector', '
// Clear all the form values. Set everything to pristine.
scopeForm.reset = function() {
angular.forEach(DOMForm, function(formElement) {
if (formElement.name) {
if (formElement.name && scopeForm[formElement.name]) {
scopeForm[formElement.name].$setViewValue("");
scopeForm[formElement.name].$render();
}
Expand Down

0 comments on commit dbca40c

Please sign in to comment.