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
This commit is contained in:
Jessica Janiuk
2025-03-27 13:48:00 -04:00
parent f7385b4140
commit fd5c981a29
+1 -3
View File
@@ -598,12 +598,10 @@ export function getParentBlockHydrationQueue(
function gatherDeferBlocksByJSActionAttribute(doc: Document): Set<HTMLElement> {
const jsactionNodes = doc.body.querySelectorAll('[jsaction]');
const blockMap = new Set<HTMLElement>();
const eventTypes = [hoverEventNames.join(':;'), interactionEventNames.join(':;')].join('|');
for (let node of jsactionNodes) {
const attr = node.getAttribute('jsaction');
const blockId = node.getAttribute('ngb');
const eventTypes = [...hoverEventNames.join(':;'), ...interactionEventNames.join(':;')].join(
'|',
);
if (attr?.match(eventTypes) && blockId !== null) {
blockMap.add(node as HTMLElement);
}