about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2023-11-10 08:48:15 -0600
committerEric Bailey <git@esb.lol>2023-11-10 08:48:15 -0600
commit60386f8f07cde330a0f36df614b04f07b89d72ab (patch)
tree513614a13c2d0242fa0f4ea5608a07443ba5d7e0
parentb0c9cce5c3ea9246fbc2f71ac64c10c5252ec9a4 (diff)
downloadvoidsky-60386f8f07cde330a0f36df614b04f07b89d72ab.tar.zst
Swap order
-rw-r--r--src/state/session/index.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/state/session/index.tsx b/src/state/session/index.tsx
index 85ae3b520..dd17284fc 100644
--- a/src/state/session/index.tsx
+++ b/src/state/session/index.tsx
@@ -376,11 +376,11 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
 
   React.useEffect(() => {
     if (isDirty.current) {
+      isDirty.current = false
       persisted.write('session', {
         accounts: state.accounts,
         currentAccount: state.currentAccount,
       })
-      isDirty.current = false
     }
   }, [state])