fuzzyworld

word-waltz / commit

fix share button

40bc5ca7258e56edf6787dc813940abe8a04fe6f · Pavel Safronov · 2026-03-26 20:53:51 -0700 · parents 522afe02155e

fix share button
 src/main.ts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main.ts b/src/main.ts
index a7870aa..af7388a 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -342,6 +342,7 @@ function showSoloGame(app: HTMLElement): void {
     unsubscribeGame = null;
     cleanupView?.();
     cleanupView = null;
+    setShareButton(null);
     app.innerHTML = '';
 
     let state = loadSoloGame();
@@ -420,6 +421,7 @@ function showSoloGame(app: HTMLElement): void {
 // ---------------------------------------------------------------------------
 
 function showHomeScreen(app: HTMLElement): void {
+    setShareButton(null);
     app.innerHTML = '';
 
     const root = document.createElement('div');