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(notifications) Fix case when description is react component instance (#13919)

Horatiu Muresana4d3fb6c708d
diff --git a/react/features/notifications/components/web/Notification.tsx b/react/features/notifications/components/web/Notification.tsx
index aadc3e2327..f61742a713 100644
--- a/react/features/notifications/components/web/Notification.tsx
+++ b/react/features/notifications/components/web/Notification.tsx
@@ -208,7 +208,7 @@ const Notification = ({
descriptionKey
&& descriptionArray.push(t(descriptionKey, descriptionArguments));
- description && descriptionArray.push(description);
+ description && typeof description === 'string' && descriptionArray.push(description);
// Keeping in mind that:
// - Notifications that use the `translateToHtml` function get an element-based description array with one entry
@@ -219,11 +219,12 @@ const Notification = ({
// the id is used for testing the UI
return (
- <p
+ <div
className = { classes.description }
data-testid = { descriptionKey } >
{shouldRenderHtml ? descriptionArray : <Message text = { descriptionArray.join(' ') } />}
- </p>
+ {typeof description === 'object' && description}
+ </div>
);
}, [ description, descriptionArguments, descriptionKey, classes ]);