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:
Julien Calixte
2026-04-04 14:39:34 +02:00
parent 64b29bcdef
commit 99c349f6df

View File

@@ -95,10 +95,10 @@ export const useUserRepoStore = defineStore("USER_REPO_STATE", {
this.userSettings?.chosenBodyFont ??
userSettings?.chosenBodyFont ??
chosenFontFamily
this.userSettings = userSettings
if (!this.userSettings) {
return
if (userSettings) {
this.userSettings = userSettings
} else if (!this.userSettings) {
this.userSettings = { $type: DataType.UserSettings }
}
this.userSettings.chosenFontFamily =