Fix bublé transpiling wrongly [...currentScript.attributes], try with Array#from instead

See https://github.com/bublejs/buble/issues/131
This commit is contained in:
Ewen Le Bihan 2023-12-17 04:03:20 +01:00
parent 6361ac892b
commit 17c93dab31

View file

@ -41,7 +41,7 @@
};
const getPageviewEventData = () => Object.fromEntries(
[...currentScript.attributes]
Array.from(currentScript.attributes)
.filter(attribute => attribute.name.match(pageviewCustomPropertyRegex))
.map(attribute => {
const match = attribute.name.match(pageviewCustomPropertyRegex);