mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08: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:
committed by
Jessica Janiuk
parent
3d2f963a90
commit
73e84e2d22
@@ -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 ??= []);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user