fix(change_detection): allow to destroy OnPush
components inside of a host event.
Closes #7192
This commit is contained in:
@ -174,7 +174,7 @@ export class ChangeDetectorJITGenerator {
|
||||
var evalRecord = this._logic.genEventBindingEvalValue(eb, r);
|
||||
var markPath = this._genMarkPathToRootAsCheckOnce(r);
|
||||
var prevDefault = this._genUpdatePreventDefault(eb, r);
|
||||
return `${evalRecord}\n${markPath}\n${prevDefault}`;
|
||||
return `${markPath}\n${evalRecord}\n${prevDefault}`;
|
||||
} else {
|
||||
return this._logic.genEventBindingEvalValue(eb, r);
|
||||
}
|
||||
|
@ -60,9 +60,11 @@ export class DynamicChangeDetector extends AbstractChangeDetector<any> {
|
||||
if (proto.isSkipRecord()) {
|
||||
protoIdx += this._computeSkipLength(protoIdx, proto, values);
|
||||
} else {
|
||||
var res = this._calculateCurrValue(proto, values, locals);
|
||||
if (proto.lastInBinding) {
|
||||
this._markPathAsCheckOnce(proto);
|
||||
}
|
||||
var res = this._calculateCurrValue(proto, values, locals);
|
||||
if (proto.lastInBinding) {
|
||||
return res;
|
||||
} else {
|
||||
this._writeSelf(proto, res, values);
|
||||
|
Reference in New Issue
Block a user