don't throw, console.warn + dummy render instead
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
55f4f1723d
commit
322b77b57f
1 changed files with 6 additions and 1 deletions
|
@ -489,7 +489,12 @@ module.exports = withMatrixClient(React.createClass({
|
||||||
// before trying to instantiate us
|
// before trying to instantiate us
|
||||||
if (!tileHandler) {
|
if (!tileHandler) {
|
||||||
const {mxEvent} = this.props;
|
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);
|
const EventTileType = sdk.getComponent(tileHandler);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue