Skip to content

Commit

Permalink
fix: allow UI settings to persist
Browse files Browse the repository at this point in the history
UI settings were being overwritten on refresh. Changing this check
appears to resolve this issue and allows for the UI settings to persist.
  • Loading branch information
pbui committed Jul 26, 2023
1 parent 7ec2bc4 commit 8f59753
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const userSettings = writable(defaultSettings)

function mergeObjects<T>(obj1: any, obj2: any): T {
for (let prop in obj2) {
if (!(prop in obj1) || obj1[prop] == null || obj2[prop] == '') {
if (!(prop in obj1) || obj1[prop] == null || obj1[prop] == '') {
obj1[prop] = obj2[prop]
}
}
Expand Down

0 comments on commit 8f59753

Please sign in to comment.