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(rn,dynamic-branding) fix handling bogus response from the backend

Saúl Ibarra Corretgéc30d1e747947
diff --git a/react/features/dynamic-branding/middleware.native.ts b/react/features/dynamic-branding/middleware.native.ts
index fd79a696c4..67b00fce24 100644
--- a/react/features/dynamic-branding/middleware.native.ts
+++ b/react/features/dynamic-branding/middleware.native.ts
@@ -32,10 +32,13 @@ MiddlewareRegistry.register(store => next => action => {
inviteDomain
};
- // TODO: implement support for gradients.
- action.value.avatarBackgrounds = avatarBackgrounds.filter(
- (color: string) => !color.includes('linear-gradient')
- );
+ // The backend may send an empty string, make sure we skip that.
+ if (Array.isArray(avatarBackgrounds)) {
+ // TODO: implement support for gradients.
+ action.value.avatarBackgrounds = avatarBackgrounds.filter(
+ (color: string) => !color.includes('linear-gradient')
+ );
+ }
break;
}