diff --git a/packages/core/src/render3/instructions/shared.ts b/packages/core/src/render3/instructions/shared.ts index 73ef585f0b4dad..bd67c7589b6e15 100644 --- a/packages/core/src/render3/instructions/shared.ts +++ b/packages/core/src/render3/instructions/shared.ts @@ -1956,11 +1956,11 @@ export function storePropertyBindingMetadata( export function getOrCreateLViewCleanup(view: LView): any[] { // top level variables should not be exported for performance reasons (PERF_NOTES.md) - return view[CLEANUP] || (view[CLEANUP] = []); + return (view[CLEANUP] ??= []); } export function getOrCreateTViewCleanup(tView: TView): any[] { - return tView.cleanup || (tView.cleanup = []); + return (tView.cleanup ??= []); } /**