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

Commit 0ef6cc6

Browse files
committed
fix(ngOptionsDirective): fix form pristine (use !equals function instead of !== for issue 13211)
1 parent ca7f4a3 commit 0ef6cc6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ng/directive/ngOptions.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,8 @@ var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) {
733733
// Check to see if the value has changed due to the update to the options
734734
if (!ngModelCtrl.$isEmpty(previousValue)) {
735735
var nextValue = selectCtrl.readValue();
736-
if (ngOptions.trackBy ? !equals(previousValue, nextValue) : previousValue !== nextValue) {
736+
ngOptions.trackBy = !equals(previousValue, nextValue);
737+
if (ngOptions.trackBy) {
737738
ngModelCtrl.$setViewValue(nextValue);
738739
ngModelCtrl.$render();
739740
}

0 commit comments

Comments
 (0)