fix: make toRaw track all calls

This commit is contained in:
littensy 2025-11-21 22:15:08 -08:00
parent 9b89284529
commit 189ae0f168
3 changed files with 21 additions and 14 deletions

View file

@ -88,7 +88,10 @@ local function trackReactive<T>(key: string, proxy: ReactiveProxy<T>)
trackedState.dispose = Charm.effect(function()
api.track()
if not config.preserveHistory or firstRun then
if not config.preserveHistory then
return
end
if firstRun then
firstRun = false
else
local oldSnapshot = snapshot