diff --git a/src/features/reset.ts b/src/features/reset.ts index 3a724e3..eaa3631 100644 --- a/src/features/reset.ts +++ b/src/features/reset.ts @@ -70,7 +70,7 @@ const listeners: Record = {}; export function trackResetTime(layer: BaseLayer, reset: GenericReset): Persistent { const resetTime = persistent(new Decimal(0)); globalBus.on("addLayer", layerBeingAdded => { - if (layer === layerBeingAdded) { + if (layer.id === layerBeingAdded.id) { listeners[layer.id]?.(); listeners[layer.id] = layer.on("preUpdate", diff => { resetTime.value = Decimal.add(resetTime.value, diff);