refactor(core): Use Nullish coalescing assignment for view getters. (#56242)

Micro optim, this wasn't minified by the optimizer.

PR Close #56242
This commit is contained in:
Matthieu Riegler 2024-06-03 20:14:33 +02:00 committed by Jessica Janiuk
parent 3d2f963a90
commit 73e84e2d22

View file

@ -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 ??= []);
}
/**