Delete callbacks after calling them

This commit is contained in:
thepaperpilot 2024-02-16 03:34:27 +00:00
parent 60f5d3c446
commit 8eb4b94ccd

View file

@ -225,6 +225,7 @@ export function initGalaxy({
} else { } else {
loadCallbacks[slot]?.accept({ slot, content, label }); loadCallbacks[slot]?.accept({ slot, content, label });
} }
delete loadCallbacks[slot];
break; break;
} }
case "saved": { case "saved": {
@ -234,6 +235,7 @@ export function initGalaxy({
} else { } else {
saveCallbacks[slot]?.accept(slot); saveCallbacks[slot]?.accept(slot);
} }
delete saveCallbacks[slot];
break; break;
} }
} }