File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed 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