Skip to content

Commit

Permalink
Replace .with() with .slice()
Browse files Browse the repository at this point in the history
`.with()` wasn't working in OBS's browser capture.

Seems like OBS is using an old browser version internally for that source.
  • Loading branch information
reyronald committed Apr 2, 2024
1 parent 454b211 commit ebd9794
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ebd9794

Please sign in to comment.