diff --git a/app/server/libs/socket.io/index.js b/app/server/libs/socket.io/index.js index f252bd36..b8193912 100644 --- a/app/server/libs/socket.io/index.js +++ b/app/server/libs/socket.io/index.js @@ -1,4 +1,3 @@ -const { getServerURL } = require("../../utils"); const socket = require("socket.io"); let io = null; diff --git a/front-src/overlay/overlay.js b/front-src/overlay/overlay.js index e3210049..87cb63bc 100644 --- a/front-src/overlay/overlay.js +++ b/front-src/overlay/overlay.js @@ -69,7 +69,8 @@ function runAnime(action, cb) { if (element.innerText !== "") { Object.entries(action.eventProps).forEach(([key, val]) => { - element.innerText = element.innerText.replaceAll(`$${key}`, val); + const regexp = new RegExp(`$${key}`, "g"); + element.innerText = element.innerText.replace(regexp, val); }); } @@ -87,7 +88,7 @@ function runAnime(action, cb) { timeline.play(); }) .catch((error) => { - cb({ error, action }); + cb({ error: error.stack, action }); $anime.remove(); }); }