1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2024-11-10 11:35:52 +01:00

fix: #5622 - prevent session theme reset during collaboration (#5640)

*  fixed #5622 - prevent session theme reset

 -  prevent newly initialized state to override theme preferences.
 - 🔧 fix for #5622

* refactor

Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
This commit is contained in:
Abdullah Adeel 2022-09-01 15:11:44 +05:00 committed by GitHub
parent a271e42af1
commit b3052f0178
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -194,7 +194,13 @@ const initializeScene = async (opts: {
scene: {
...scene,
appState: {
...restoreAppState(scene?.appState, excalidrawAPI.getAppState()),
...restoreAppState(
{
...scene?.appState,
theme: localDataState?.appState?.theme || scene?.appState?.theme,
},
excalidrawAPI.getAppState(),
),
// necessary if we're invoking from a hashchange handler which doesn't
// go through App.initializeScene() that resets this flag
isLoading: false,