fix: preserve font settings when repo has no .remanso.json
When no config file exists, userSettings was set to null which destroyed cached user preferences and silently blocked all setFont* actions.
This commit is contained in:
@@ -95,10 +95,10 @@ export const useUserRepoStore = defineStore("USER_REPO_STATE", {
|
|||||||
this.userSettings?.chosenBodyFont ??
|
this.userSettings?.chosenBodyFont ??
|
||||||
userSettings?.chosenBodyFont ??
|
userSettings?.chosenBodyFont ??
|
||||||
chosenFontFamily
|
chosenFontFamily
|
||||||
|
if (userSettings) {
|
||||||
this.userSettings = userSettings
|
this.userSettings = userSettings
|
||||||
|
} else if (!this.userSettings) {
|
||||||
if (!this.userSettings) {
|
this.userSettings = { $type: DataType.UserSettings }
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.userSettings.chosenFontFamily =
|
this.userSettings.chosenFontFamily =
|
||||||
|
|||||||
Reference in New Issue
Block a user