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

Commit

Permalink
fix(ngOptionsDirective): fix form pristine (use !equals function inst…
Browse files Browse the repository at this point in the history
…ead of !== for issue 13211)
  • Loading branch information
m-amr committed Nov 18, 2015
1 parent ca7f4a3 commit 0ef6cc6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ng/directive/ngOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,8 @@ var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) {
// Check to see if the value has changed due to the update to the options
if (!ngModelCtrl.$isEmpty(previousValue)) {
var nextValue = selectCtrl.readValue();
if (ngOptions.trackBy ? !equals(previousValue, nextValue) : previousValue !== nextValue) {
ngOptions.trackBy = !equals(previousValue, nextValue);
if (ngOptions.trackBy) {
ngModelCtrl.$setViewValue(nextValue);
ngModelCtrl.$render();
}
Expand Down

0 comments on commit 0ef6cc6

Please sign in to comment.