forked from AkkomaGang/admin-fe
Fix :mime, :extensions freaking out adminfe
This commit is contained in:
parent
0802dc5777
commit
d58fe6f84d
2 changed files with 5 additions and 3 deletions
|
@ -37,7 +37,7 @@ const getValueWithoutKey = (key, [type, value]) => {
|
||||||
updatedArray[index] = { 'tuple': ['ExSyslogger', ':ex_syslogger'] }
|
updatedArray[index] = { 'tuple': ['ExSyslogger', ':ex_syslogger'] }
|
||||||
}
|
}
|
||||||
return updatedArray
|
return updatedArray
|
||||||
} else if (key === ':types') {
|
} else if ([':types', ':extensions'].includes(key)) {
|
||||||
return Object.keys(value).reduce((acc, key) => { return { ...acc, [key]: value[key][1] } }, {})
|
return Object.keys(value).reduce((acc, key) => { return { ...acc, [key]: value[key][1] } }, {})
|
||||||
}
|
}
|
||||||
return value
|
return value
|
||||||
|
@ -186,7 +186,7 @@ export const processNested = (valueForState, valueForUpdatedSettings, group, par
|
||||||
...{ [key]: [type, valueForUpdatedSettings] }}
|
...{ [key]: [type, valueForUpdatedSettings] }}
|
||||||
: { [key]: [type, valueForUpdatedSettings] }
|
: { [key]: [type, valueForUpdatedSettings] }
|
||||||
|
|
||||||
if (group === ':mime' && parents[0].key === ':types') {
|
if (group === ':mime' && [':types', ':extensions'].includes(parents[0].key)) {
|
||||||
updatedValueForState = settings[group][parents[0].key]
|
updatedValueForState = settings[group][parents[0].key]
|
||||||
? { ...settings[group][parents[0].key].value, ...updatedValueForState }
|
? { ...settings[group][parents[0].key].value, ...updatedValueForState }
|
||||||
: updatedValueForState
|
: updatedValueForState
|
||||||
|
@ -229,6 +229,7 @@ export const valueHasTuples = (key, value) => {
|
||||||
const valueIsArrayOfNonObjects = Array.isArray(value) && value.length > 0 && value.every(el => typeof el !== 'object')
|
const valueIsArrayOfNonObjects = Array.isArray(value) && value.length > 0 && value.every(el => typeof el !== 'object')
|
||||||
return key === ':meta' ||
|
return key === ':meta' ||
|
||||||
key === ':types' ||
|
key === ':types' ||
|
||||||
|
key === ':extensions' ||
|
||||||
key === ':backends' ||
|
key === ':backends' ||
|
||||||
key === ':compiled_template_engines' ||
|
key === ':compiled_template_engines' ||
|
||||||
key === ':compiled_format_encoders' ||
|
key === ':compiled_format_encoders' ||
|
||||||
|
|
|
@ -120,7 +120,8 @@ const settings = {
|
||||||
const searchObject = formSearchObject(data)
|
const searchObject = formSearchObject(data)
|
||||||
commit('SET_SEARCH', searchObject)
|
commit('SET_SEARCH', searchObject)
|
||||||
commit('SET_TABS', tabs)
|
commit('SET_TABS', tabs)
|
||||||
} catch (_e) {
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
commit('TOGGLE_TABS', true)
|
commit('TOGGLE_TABS', true)
|
||||||
commit('SET_LOADING', false)
|
commit('SET_LOADING', false)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue