Merge pull request 'fix errors on initial pleroma-fe boot' (#3501) from fix-sync-filters into develop

Reviewed-on: https://git.pleroma.social/pleroma/pleroma-fe/pulls/3501
This commit is contained in:
HJ 2026-06-03 00:31:10 +00:00
commit 52acdf007c
2 changed files with 3 additions and 2 deletions

View file

@ -264,7 +264,7 @@ const Status = {
},
muteFilterHits() {
return muteFilterHits(
Object.values(useSyncConfigStore().prefsStorage.simple.muteFilters),
Object.values(useSyncConfigStore().prefsStorage.simple.muteFilters || {}),
this.status,
)
},

View file

@ -796,11 +796,12 @@ export const useSyncConfigStore = defineStore('sync_config', {
afterLoad(state) {
console.debug('Validating persisted state of SyncConfig')
const newState = { ...state }
newState.prefsStorage = newState.prefsStorage || {}
const newEntries = Object.entries(ROOT_CONFIG).map(([path, value]) => {
const definition = ROOT_CONFIG_DEFINITIONS[path]
const finalValue = validateSetting({
path,
value: newState.prefsStorage.simple[path],
value: newState.prefsStorage.simple?.[path],
definition,
throwError: false,
validateObjects: false,