Fix updates being skipped due to erroneous use of 'skip update' flags
This commit is contained in:
parent
bc5563d776
commit
710397c46b
|
@ -112,7 +112,7 @@ export const getFrontendStore = () => {
|
||||||
}
|
}
|
||||||
let clone = cloneDeep(screen)
|
let clone = cloneDeep(screen)
|
||||||
const result = patchFn(clone)
|
const result = patchFn(clone)
|
||||||
|
// An explicit false result means skip this change
|
||||||
if (result === false) {
|
if (result === false) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -879,11 +879,14 @@ export const getFrontendStore = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mutates the fetched component with updates
|
// Mutates the fetched component with updates
|
||||||
const updated = patchFn(component, screen)
|
const patchResult = patchFn(component, screen)
|
||||||
|
|
||||||
// Mutates the component with any required settings updates
|
// Mutates the component with any required settings updates
|
||||||
const migrated = store.actions.components.migrateSettings(component)
|
const migrated = store.actions.components.migrateSettings(component)
|
||||||
|
|
||||||
return updated || migrated
|
// Returning an explicit false signifies that we should skip this
|
||||||
|
// update. If we migrated something, ensure we never skip.
|
||||||
|
return migrated ? null : patchResult
|
||||||
}
|
}
|
||||||
await store.actions.screens.patch(patchScreen, screenId)
|
await store.actions.screens.patch(patchScreen, screenId)
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue