mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user