From 322b77b57f6407b59822b5b885c66b9c97aec80d Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 29 Jun 2018 12:54:36 +0100 Subject: [PATCH] don't throw, console.warn + dummy render instead Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/rooms/EventTile.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index 9b8aae9726..76c808f0fd 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -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
+
+ { _t('This event could not be displayed') } +
+
; } const EventTileType = sdk.getComponent(tileHandler);