mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
fix(notifications) Fix case when description is react component instance (#13919)
This commit is contained in:
@@ -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 ]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user