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

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
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

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);