about summary refs log tree commit diff
path: root/src/state/shell/composer/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/shell/composer/index.tsx')
-rw-r--r--src/state/shell/composer/index.tsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/state/shell/composer/index.tsx b/src/state/shell/composer/index.tsx
index 9cac64426..7138945f4 100644
--- a/src/state/shell/composer/index.tsx
+++ b/src/state/shell/composer/index.tsx
@@ -83,7 +83,13 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
         'exclamation-circle',
       )
     } else {
-      setState(opts)
+      setState(prevOpts => {
+        if (prevOpts) {
+          // Never replace an already open composer.
+          return prevOpts
+        }
+        return opts
+      })
     }
   })