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
7
7
.env
8
8
.env.local
9
9
.npmrc
10
+ .yarn
10
11
11
12
# output directory
12
13
build
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 37
37
"test-compile" : " tsc -watch -p ./"
38
38
},
39
39
"dependencies" : {
40
+ "@types/vscode" : " ^1.63.1" ,
40
41
"chokidar" : " 3.5.2" ,
41
42
"dotenv" : " ^8.2.0" ,
42
43
"eslint" : " 7.32.0" ,
68
69
"eslint-plugin-react" : " 7.27.1" ,
69
70
"eslint-plugin-react-hooks" : " ^4.3.0" ,
70
71
"prettier" : " 2.5.0" ,
71
- "vscode" : " ^1.1.37" ,
72
72
"vscode-test" : " ^1.6.1"
73
73
},
74
74
"engines" : {
104
104
},
105
105
"preview" : true ,
106
106
"publisher" : " CodeRoad" ,
107
- "icon" : " coderoad_icon.png"
107
+ "icon" : " coderoad_icon.png" ,
108
+ "packageManager" : " yarn@3.1.1"
108
109
}
Original file line number Diff line number Diff line change @@ -37,13 +37,13 @@ class Storage<T> {
37
37
if ( ! sessionFile ) {
38
38
throw new Error ( 'No session file found' )
39
39
}
40
- const data : T = JSON . parse ( sessionFile )
40
+ const valueFromFile : T = JSON . parse ( sessionFile )
41
41
42
- if ( data ) {
42
+ if ( valueFromFile ) {
43
43
// validate session
44
- const keys = Object . keys ( data )
44
+ const keys = Object . keys ( valueFromFile )
45
45
if ( keys . length ) {
46
- return data
46
+ return valueFromFile
47
47
}
48
48
}
49
49
} catch ( err ) {
@@ -54,7 +54,8 @@ class Storage<T> {
54
54
if ( value ) {
55
55
// 2. read from local storage
56
56
try {
57
- return JSON . parse ( value )
57
+ const valueFromLocalStorage = JSON . parse ( value )
58
+ return valueFromLocalStorage
58
59
} catch ( err ) {
59
60
console . warn ( `Failed to parse session state from local storage: ${ value } ` )
60
61
}
You can’t perform that action at this time.
0 commit comments