File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 4242 run-tests :
4343 runs-on : ubuntu-latest
4444 name : Run tests
45- needs : [ build ]
45+ needs : [build]
4646
4747 steps :
4848 - uses : actions/checkout@v2
5353 - name : Install dependencies
5454 run : npm ci
5555 env :
56- PUPPETEER_SKIP_CHROMIUM_DOWNLOAD : ' true'
56+ PUPPETEER_SKIP_CHROMIUM_DOWNLOAD : " true"
5757
5858 - name : Test code
59- uses : mujo-code /puppeteer-headful@master
59+ uses : mymindstorm /puppeteer-headful@8f745c770f7f4c0f9f332d7c43a775f90e53779a
6060 with :
6161 args : npm test
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ export class UserSettings {
153153 ? StorageLocation . Local
154154 : storageLocation ;
155155 const storageData : UserSettingsData =
156- ( await chrome . storage [ location ] . get ( "UserSettings" ) ) . UserSettings || { } ;
156+ ( await chrome . storage [ location ] . get ( "UserSettings" ) ) ? .UserSettings || { } ;
157157 delete storageData [ key ] ;
158158
159159 UserSettings . items = storageData ;
@@ -163,7 +163,7 @@ export class UserSettings {
163163
164164 private static async getStorageData ( location : StorageLocation ) {
165165 const storageData : UserSettingsData =
166- ( await chrome . storage [ location ] . get ( "UserSettings" ) ) . UserSettings || { } ;
166+ ( await chrome . storage [ location ] . get ( "UserSettings" ) ) ? .UserSettings || { } ;
167167
168168 return storageData ;
169169 }
Original file line number Diff line number Diff line change @@ -480,8 +480,10 @@ export class Accounts implements Module {
480480 newStorageLocation === StorageLocation . Sync
481481 ) {
482482 const localData = await chrome . storage . local . get ( ) ;
483- delete localData . UserSettings ;
484- await chrome . storage . sync . set ( localData ) ;
483+ if ( localData ?. UserSettings ) {
484+ delete localData . UserSettings ;
485+ await chrome . storage . sync . set ( localData ) ;
486+ }
485487 const syncData = await chrome . storage . sync . get ( ) ;
486488
487489 // Double check if data was set
You can’t perform that action at this time.
0 commit comments