Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(dynamic-branding) fix loading on web

Saúl Ibarra Corretgé989b8d9c2b84
diff --git a/react/features/dynamic-branding/functions.any.js b/react/features/dynamic-branding/functions.any.js
index d962fc24a5..26cc80b537 100644
--- a/react/features/dynamic-branding/functions.any.js
+++ b/react/features/dynamic-branding/functions.any.js
@@ -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) {