Skip to content

Commit bc79985

Browse files
fix(core): fix regexp for event types (#60592)
This regexp accidentally worked. It was splitting by individual character and putting a pipe in rather than splitting by set of event types PR Close #60592
1 parent 3bc8fe4 commit bc79985

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/core/src/hydration/utils.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,12 +598,10 @@ export function getParentBlockHydrationQueue(
598598
function gatherDeferBlocksByJSActionAttribute(doc: Document): Set<HTMLElement> {
599599
const jsactionNodes = doc.body.querySelectorAll('[jsaction]');
600600
const blockMap = new Set<HTMLElement>();
601+
const eventTypes = [hoverEventNames.join(':;'), interactionEventNames.join(':;')].join('|');
601602
for (let node of jsactionNodes) {
602603
const attr = node.getAttribute('jsaction');
603604
const blockId = node.getAttribute('ngb');
604-
const eventTypes = [...hoverEventNames.join(':;'), ...interactionEventNames.join(':;')].join(
605-
'|',
606-
);
607605
if (attr?.match(eventTypes) && blockId !== null) {
608606
blockMap.add(node as HTMLElement);
609607
}

0 commit comments

Comments
 (0)