mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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:
parent
3d2f963a90
commit
73e84e2d22
1 changed files with 2 additions and 2 deletions
|
|
@ -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 ??= []);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue