fix(dynamic-branding) fix loading on web
The configuration is not stored in Redux by the time we try to fetch it, so use the global on Window, which will.
This commit is contained in:
parent
eb20e85166
commit
989b8d9c2b
|
@ -36,7 +36,11 @@ export function extractFqnFromPath(state?: Object) {
|
|||
*/
|
||||
export async function getDynamicBrandingUrl(stateful: Object | Function) {
|
||||
const state = toState(stateful);
|
||||
const config = state['features/base/config'];
|
||||
|
||||
// NB: On web this is dispatched really early, before the config has been stored in the
|
||||
// state. Thus, fetch it from the window global.
|
||||
const config
|
||||
= navigator.product === 'ReactNative' ? state['features/base/config'] : window.config;
|
||||
const { dynamicBrandingUrl } = config;
|
||||
|
||||
if (dynamicBrandingUrl) {
|
||||
|
|
Loading…
Reference in New Issue