From 9e13f6fc115d2da47918947b1cd613b985d6d653 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 13 Jun 2022 10:59:11 +0100 Subject: [PATCH] Add try-catch around blurhash loading --- src/components/views/messages/MVideoBody.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/views/messages/MVideoBody.tsx b/src/components/views/messages/MVideoBody.tsx index 1ac389a6bc1..c46f64a3011 100644 --- a/src/components/views/messages/MVideoBody.tsx +++ b/src/components/views/messages/MVideoBody.tsx @@ -136,7 +136,11 @@ export default class MVideoBody extends React.PureComponent this.forceUpdate(); // we don't really have a reliable thing to update, so just update the whole thing }); - this.loadBlurhash(); + try { + this.loadBlurhash(); + } catch (e) { + logger.error("Failed to load blurhash", e); + } if (this.props.mediaEventHelper.media.isEncrypted && this.state.decryptedUrl === null) { try {