From 17c93dab31e55ade8c901705a80fc75b44b13b9d Mon Sep 17 00:00:00 2001 From: Ewen Le Bihan Date: Sun, 17 Dec 2023 04:03:20 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20bubl=C3=A9=20transpiling=20wrongly=20[...?= =?UTF-8?q?currentScript.attributes],=20try=20with=20Array#from=20instead?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/bublejs/buble/issues/131 --- src/tracker/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tracker/index.js b/src/tracker/index.js index cab33db00..c51728562 100644 --- a/src/tracker/index.js +++ b/src/tracker/index.js @@ -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);