Skip to content

Commit 321a47e

Browse files
author
Gusted
authored
Fix for syncsetting error (darkreader#3425)
- Make sure to have a boolean in syncsettings. If local hasn't it the default setting would be chosen. - Resolves darkreader#3424
1 parent fdadd80 commit 321a47e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/background/user-storage.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export default class UserStorage {
2323
private loadSettingsFromStorage() {
2424
return new Promise<UserSettings>((resolve) => {
2525
chrome.storage.local.get(DEFAULT_SETTINGS, (local: UserSettings) => {
26+
local.syncSettings = local.syncSettings || DEFAULT_SETTINGS.syncSettings;
2627
if (!local.syncSettings) {
2728
local.theme = {...DEFAULT_SETTINGS.theme, ...local.theme};
2829
local.time = {...DEFAULT_SETTINGS.time, ...local.time};

0 commit comments

Comments
 (0)