From 8eb4b94ccde6f64c86dc43a164d92c5e3f78d2d9 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Fri, 16 Feb 2024 03:34:27 +0000 Subject: [PATCH] Delete callbacks after calling them --- galaxy.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/galaxy.js b/galaxy.js index 0bc2777..fc00f92 100644 --- a/galaxy.js +++ b/galaxy.js @@ -225,6 +225,7 @@ export function initGalaxy({ } else { loadCallbacks[slot]?.accept({ slot, content, label }); } + delete loadCallbacks[slot]; break; } case "saved": { @@ -234,6 +235,7 @@ export function initGalaxy({ } else { saveCallbacks[slot]?.accept(slot); } + delete saveCallbacks[slot]; break; } }