refactor: use setCurrentSub instead of pauseTracking

This commit is contained in:
littensy 2025-05-08 00:12:51 -07:00
parent 571d2c0d91
commit a53683d59e
9 changed files with 21 additions and 24 deletions

View file

@ -25,9 +25,9 @@ local function simpleMapped(source: () -> { Entry }, mapper: (Entry, number) ->
local nextState = {}
for index, value in state do
local prevSub = setCurrentSub(nil)
local currentSub = setCurrentSub(nil)
local success, valueOut, keyOut = pcall(mapper, value, index)
setCurrentSub(prevSub)
setCurrentSub(currentSub)
if success then
nextState[keyOut] = valueOut