don't throw, console.warn + dummy render instead

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2018-06-29 12:54:36 +01:00
parent 55f4f1723d
commit 322b77b57f
No known key found for this signature in database
GPG Key ID: 3F879DA5AD802A5E
1 changed files with 6 additions and 1 deletions

View File

@ -489,7 +489,12 @@ module.exports = withMatrixClient(React.createClass({
// before trying to instantiate us
if (!tileHandler) {
const {mxEvent} = this.props;
throw new Error(`Event type not supported: type:${mxEvent.getType()} isState:${mxEvent.isState()}`);
console.warn(`Event type not supported: type:${mxEvent.getType()} isState:${mxEvent.isState()}`);
return <div className="mx_EventTile mx_EventTile_info mx_MNoticeBody">
<div className="mx_EventTile_line">
{ _t('This event could not be displayed') }
</div>
</div>;
}
const EventTileType = sdk.getComponent(tileHandler);