Explorar o código

Merge pull request #20317 from overleaf/em-github-sync-errors

Replace alerts with notifications in the github-sync modal

GitOrigin-RevId: 772add41b2d525353dc0c0362ebc64c4a023e2c3
Eric Mc Sween hai 1 ano
pai
achega
889fa1a3c3
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      services/web/frontend/stories/hooks/use-scope.tsx

+ 5 - 1
services/web/frontend/stories/hooks/use-scope.tsx

@@ -19,7 +19,11 @@ export const useScope = (scope: Record<string, unknown>) => {
         } catch {
         } catch {
           // allowed not to exist
           // allowed not to exist
         }
         }
-        window.overleaf.unstable.store.set(path, merge(existingValue, value))
+        if (typeof existingValue === 'object' && typeof value === 'object') {
+          window.overleaf.unstable.store.set(path, merge(existingValue, value))
+        } else {
+          window.overleaf.unstable.store.set(path, value)
+        }
       }
       }
     }
     }
   }, [])
   }, [])