Skip to content

Commit d072dfd

Browse files
author
Shashank Agrawal
authored
Merge pull request #15 from chrisjensen/master
isValidateDisabled - fix error when no parents
2 parents d2bb47f + bf024ac commit d072dfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/validation.service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ angular.module('bootstrap.angular.validation').factory('BsValidationService', ['
157157
}
158158

159159
var $parentForm = $element.parents('form');
160-
return $parentForm && $parentForm[0].attributes.hasOwnProperty(attribute);
160+
return $parentForm[0] && $parentForm[0].attributes.hasOwnProperty(attribute);
161161
},
162162

163163
removeErrorClass: function($formGroupElement) {

0 commit comments

Comments
 (0)