mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-18 12:08:17 +08:00
fix($parse): Handle one-time to null
Handles when a one-time binding stabilizes to `null` Closes #7743 Closes #7787
This commit is contained in:
committed by
rodyhaddad
parent
398053c563
commit
600a41a7b6
@@ -1055,7 +1055,8 @@ function $ParseProvider() {
|
||||
if (oneTimeParseFn.$$unwatch && self && self.$$postDigestQueue) {
|
||||
self.$$postDigestQueue.push(function () {
|
||||
// create a copy if the value is defined and it is not a $sce value
|
||||
if ((stable = isDefined(lastValue)) && !lastValue.$$unwrapTrustedValue) {
|
||||
if ((stable = isDefined(lastValue)) &&
|
||||
(lastValue === null || !lastValue.$$unwrapTrustedValue)) {
|
||||
lastValue = copy(lastValue, null);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user