File tree Expand file tree Collapse file tree 7 files changed +31075
-22720
lines changed Expand file tree Collapse file tree 7 files changed +31075
-22720
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ package-lock.json
77.env
88.env.local
99.npmrc
10+ .yarn
1011
1112# output directory
1213build
Original file line number Diff line number Diff line change 1+ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+ # yarn lockfile v1
3+
4+
5+ yarn-path ".yarn/releases/yarn-1.22.17.cjs"
Original file line number Diff line number Diff line change 1+ nodeLinker : node-modules
2+
3+ yarnPath : .yarn/releases/yarn-3.1.1.cjs
Original file line number Diff line number Diff line change 3737 "test-compile" : " tsc -watch -p ./"
3838 },
3939 "dependencies" : {
40+ "@types/vscode" : " ^1.63.1" ,
4041 "chokidar" : " 3.5.2" ,
4142 "dotenv" : " ^8.2.0" ,
4243 "eslint" : " 7.32.0" ,
6869 "eslint-plugin-react" : " 7.27.1" ,
6970 "eslint-plugin-react-hooks" : " ^4.3.0" ,
7071 "prettier" : " 2.5.0" ,
71- "vscode" : " ^1.1.37" ,
7272 "vscode-test" : " ^1.6.1"
7373 },
7474 "engines" : {
104104 },
105105 "preview" : true ,
106106 "publisher" : " CodeRoad" ,
107- "icon" : " coderoad_icon.png"
107+ "icon" : " coderoad_icon.png" ,
108+ "packageManager" : " yarn@3.1.1"
108109}
Original file line number Diff line number Diff line change @@ -37,13 +37,13 @@ class Storage<T> {
3737 if ( ! sessionFile ) {
3838 throw new Error ( 'No session file found' )
3939 }
40- const data : T = JSON . parse ( sessionFile )
40+ const valueFromFile : T = JSON . parse ( sessionFile )
4141
42- if ( data ) {
42+ if ( valueFromFile ) {
4343 // validate session
44- const keys = Object . keys ( data )
44+ const keys = Object . keys ( valueFromFile )
4545 if ( keys . length ) {
46- return data
46+ return valueFromFile
4747 }
4848 }
4949 } catch ( err ) {
@@ -54,7 +54,8 @@ class Storage<T> {
5454 if ( value ) {
5555 // 2. read from local storage
5656 try {
57- return JSON . parse ( value )
57+ const valueFromLocalStorage = JSON . parse ( value )
58+ return valueFromLocalStorage
5859 } catch ( err ) {
5960 console . warn ( `Failed to parse session state from local storage: ${ value } ` )
6061 }
You can’t perform that action at this time.
0 commit comments