nicolium: use new key for frontend_configurations
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -49,7 +49,7 @@ const updateFrontendConfig = (data: Record<string, any>) => (dispatch: AppDispat
|
||||
key: ':frontend_configurations',
|
||||
value: [
|
||||
{
|
||||
tuple: [':pl_fe', data],
|
||||
tuple: [':nicolium', data],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@ -33,10 +33,14 @@ const fetchFrontendConfig =
|
||||
|
||||
if (features.frontendConfigurations) {
|
||||
return dispatch(fetchFrontendConfigurations()).then((data) => {
|
||||
const key = 'pl_fe';
|
||||
if (data[key]) {
|
||||
dispatch(importFrontendConfig(data[key], host));
|
||||
return data[key];
|
||||
const legacyKey = 'pl_fe';
|
||||
const key = 'nicolium';
|
||||
|
||||
const foundData = data[key] || data[legacyKey];
|
||||
|
||||
if (foundData) {
|
||||
dispatch(importFrontendConfig(foundData, host));
|
||||
return foundData;
|
||||
} else {
|
||||
return dispatch(fetchFrontendConfigJson(host));
|
||||
}
|
||||
|
||||
@ -35,8 +35,8 @@ const preloadImport = (state: Record<string, any>, action: Record<string, any>)
|
||||
const feData = action.data[path];
|
||||
|
||||
if (feData) {
|
||||
const plfe = feData.pl_fe;
|
||||
return plfe ? { ...fallbackState, ...plfe } : fallbackState;
|
||||
const nicoliumConfig = feData.nicolium || feData.pl_fe;
|
||||
return nicoliumConfig ? { ...fallbackState, ...nicoliumConfig } : fallbackState;
|
||||
} else {
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user