fix sync_config test
This commit is contained in:
parent
be82385d79
commit
9374b0e290
2 changed files with 67 additions and 61 deletions
|
|
@ -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 }) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue