Skip to content

Commit 33b0d25

Browse files
JeanMechethePunderWoman
authored andcommitted
refactor(core): Use Nullish coalescing assignment for view getters. (#56242)
Micro optim, this wasn't minified by the optimizer. PR Close #56242
1 parent a23850f commit 33b0d25

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • packages/core/src/render3/instructions

packages/core/src/render3/instructions/shared.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1955,11 +1955,11 @@ export function storePropertyBindingMetadata(
19551955

19561956
export function getOrCreateLViewCleanup(view: LView): any[] {
19571957
// top level variables should not be exported for performance reasons (PERF_NOTES.md)
1958-
return view[CLEANUP] || (view[CLEANUP] = []);
1958+
return (view[CLEANUP] ??= []);
19591959
}
19601960

19611961
export function getOrCreateTViewCleanup(tView: TView): any[] {
1962-
return tView.cleanup || (tView.cleanup = []);
1962+
return (tView.cleanup ??= []);
19631963
}
19641964

19651965
/**

0 commit comments

Comments
 (0)