Skip to content

Commit

Permalink
guard against part types that have not been impl in the view
Browse files Browse the repository at this point in the history
  • Loading branch information
bwindels committed Aug 7, 2021
1 parent d9d7683 commit dbb9e53
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/platform/web/ui/session/room/timeline/TextMessageView.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ const formatFunction = {

function renderPart(part) {
const f = formatFunction[part.type];
if (!f) {
return text(`[unknown part type ${part.type}]`);
}
return f(part);
}

Expand Down

0 comments on commit dbb9e53

Please sign in to comment.