fix sync_config test

This commit is contained in:
Henry Jameson 2026-04-01 18:52:32 +03:00
commit 9374b0e290
2 changed files with 67 additions and 61 deletions

View file

@ -292,18 +292,23 @@ export const _mergePrefs = (recent, stale) => {
const totalJournal = _mergeJournal(staleJournal, recentJournal)
totalJournal
.filter(({ path, operation, args }) => {
const entry = path.split('.')[1]
if (operation === 'unset') return ROOT_CONFIG[entry] !== undefined
const definition = path.startsWith('simple.muteFilters')
? { default: {} }
: ROOT_CONFIG_DEFINITIONS[path.split('.')[1]]
: ROOT_CONFIG_DEFINITIONS[entry]
const finalValue = validateSetting({
path: path.split('.')[1],
path: entry,
value: args[0],
definition,
throwError: false,
defaultState: ROOT_CONFIG,
})
console.log(path, args[0])
return finalValue !== undefined
})
.forEach(({ path, operation, args }) => {