Skip to content

Commit bae7b75

Browse files
JeanMechethePunderWoman
authored andcommitted
refactor(core): retrieve the jsActionMap only once. (angular#60587)
Before the change, the map was pull on every loop execution. PR Close angular#60587
1 parent 0c53970 commit bae7b75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/hydration/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,8 +611,8 @@ function gatherDeferBlocksByJSActionAttribute(doc: Document): Set<HTMLElement> {
611611

612612
export function appendDeferBlocksToJSActionMap(doc: Document, injector: Injector) {
613613
const blockMap = gatherDeferBlocksByJSActionAttribute(doc);
614+
const jsActionMap = injector.get(JSACTION_BLOCK_ELEMENT_MAP);
614615
for (let rNode of blockMap) {
615-
const jsActionMap = injector.get(JSACTION_BLOCK_ELEMENT_MAP);
616616
sharedMapFunction(rNode, jsActionMap);
617617
}
618618
}

0 commit comments

Comments
 (0)