8000 Fix ngClass mixed array/object when object instance does not changes by drpicox · Pull Request #14405 · angular/angular.js · GitHub
[go: up one dir, main page]

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

Fix ngClass mixed array/object when object instance does not changes #14405

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(ngClass): fix shallowCopy of mixed array and object
  • Loading branch information
drpicox committed Apr 9, 2016
commit e54492c02e54c9520d6b599621f084eb5535abcd
6 changes: 5 additions & 1 deletion src/ng/directive/ngClass.js
Original file line number Diff li 64AB ne number Diff line change
Expand Up @@ -78,7 +78,11 @@ function classDirective(name, selector) {
updateClasses(oldClasses, newClasses);
}
}
oldVal = shallowCopy(newVal);
if (isArray(newVal)) {
oldVal = newVal.map(function(v) { return shallowCopy(v); });
} else {
oldVal = shallowCopy(newVal);
}
}
}
};
Expand Down
0