fix invalid option copy
This commit is contained in:
parent
095abb2914
commit
912aa228d1
9 changed files with 42 additions and 58 deletions
|
|
@ -162,17 +162,17 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => {
|
|||
config = Object.assign({}, staticConfig, apiConfig)
|
||||
}
|
||||
|
||||
const copyInstanceOption = (path) => {
|
||||
if (typeof config[name] !== 'undefined') {
|
||||
useInstanceStore().set({ path, value: config[name] })
|
||||
const copyInstanceOption = ({ source, destination }) => {
|
||||
if (typeof config[source] !== 'undefined') {
|
||||
useInstanceStore().set({ path: destination, value: config[source] })
|
||||
}
|
||||
}
|
||||
|
||||
Object.keys(staticOrApiConfigDefault)
|
||||
.map((k) => `instanceIdentity.${k}`)
|
||||
.map((k) => ({ source: k, destination: `instanceIdentity.${k}`}))
|
||||
.forEach(copyInstanceOption)
|
||||
Object.keys(instanceDefaultConfig)
|
||||
.map((k) => `prefsStorage.${k}`)
|
||||
.map((k) => ({ source: k, destination: `prefsStorage.${k}`}))
|
||||
.forEach(copyInstanceOption)
|
||||
|
||||
useAuthFlowStore().setInitialStrategy(config.loginMethod)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue