fix(ivy): do not invoke change detection for destroyed views (#34241)
Prior to this commit, calling change detection for destroyed views resulted in errors being thrown in some cases. This commit adds a check to make sure change detection is invoked for non-destroyed views only. PR Close #34241
This commit is contained in:
@ -380,8 +380,9 @@ export function renderView<T>(lView: LView, tView: TView, context: T): void {
|
||||
export function refreshView<T>(
|
||||
lView: LView, tView: TView, templateFn: ComponentTemplate<{}>| null, context: T) {
|
||||
ngDevMode && assertEqual(isCreationMode(lView), false, 'Should be run in update mode');
|
||||
enterView(lView, lView[T_HOST]);
|
||||
const flags = lView[FLAGS];
|
||||
if ((flags & LViewFlags.Destroyed) === LViewFlags.Destroyed) return;
|
||||
enterView(lView, lView[T_HOST]);
|
||||
try {
|
||||
resetPreOrderHookFlags(lView);
|
||||
|
||||
|
Reference in New Issue
Block a user