From ebd9794a356ac60413289c34d02f8699823c1678 Mon Sep 17 00:00:00 2001 From: Ronald Rey Date: Tue, 2 Apr 2024 19:31:15 -0400 Subject: [PATCH] Replace `.with()` with `.slice()` `.with()` wasn't working in OBS's browser capture. Seems like OBS is using an old browser version internally for that source. --- src/App.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index ab0012b..c2b80f8 100644 --- a/src/App.js +++ b/src/App.js @@ -125,7 +125,9 @@ export default function App() { if (logCode === LINE_ID.NetworkCancelAbility) { return actionList.slice(0, -1) } else if (lastAction?.action === action && lastAction?.casting) { - return actionList.with(-1, { ...lastAction, casting: false }) + const nextActionList = actionList.slice() + nextActionList[nextActionList.length -1] = { ...lastAction, casting: false } + return nextActionList } else { const key = (lastKey % 256) + 1 lastKey = key