File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
1
import { Chapter , Variant } from 'js-slang/dist/types' ;
2
- import { compressToUTF16 , decompressFromUTF16 } from 'lz-string' ;
3
2
import { StoriesAuthState } from 'src/features/stories/StoriesTypes' ;
4
3
5
4
import { OverallState , SALanguage } from '../commons/application/ApplicationTypes' ;
@@ -38,11 +37,11 @@ export const loadStoredState = (): SavedState | undefined => {
38
37
if ( ! serializedState ) {
39
38
return undefined ;
40
39
}
41
- const decompressed = decompressFromUTF16 ( serializedState ) ;
42
- if ( ! decompressed ) {
43
- return undefined ;
44
- }
45
- return JSON . parse ( decompressed ) as SavedState ;
40
+ // const decompressed = decompressFromUTF16(serializedState);
41
+ // if (!decompressed) {
42
+ // return undefined;
43
+ // }
44
+ return JSON . parse ( serializedState ) as SavedState ;
46
45
} catch ( err ) {
47
46
showWarningMessage ( 'Error loading from local storage' ) ;
48
47
return undefined ;
@@ -91,7 +90,7 @@ export const saveState = (state: OverallState) => {
91
90
role : state . stories . role
92
91
}
93
92
} ;
94
- const serialized = compressToUTF16 ( JSON . stringify ( stateToBeSaved ) ) ;
93
+ const serialized = JSON . stringify ( stateToBeSaved ) ;
95
94
localStorage . setItem ( 'storedState' , serialized ) ;
96
95
} catch ( err ) {
97
96
showWarningMessage ( 'Error saving to local storage' ) ;
You can’t perform that action at this time.
0 commit comments