From 8e405dda2e5ec77f9063ced1abd0154eab96bad4 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 1 Apr 2020 16:22:42 -0600 Subject: [PATCH] Fix soft crash when editing message Fixes https://github.com/matrix-org/riot-web-rageshakes/issues/2504 --- src/components/views/rooms/BasicMessageComposer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/BasicMessageComposer.js b/src/components/views/rooms/BasicMessageComposer.js index df62823360..a967488ad3 100644 --- a/src/components/views/rooms/BasicMessageComposer.js +++ b/src/components/views/rooms/BasicMessageComposer.js @@ -94,7 +94,8 @@ export default class BasicMessageEditor extends React.Component { this._emoticonSettingHandle = null; } - componentDidUpdate(prevProps) { + // TODO: [REACT-WARNING] Move into better lifecycle position + UNSAFE_componentWillUpdate(prevProps) { if (this.props.placeholder !== prevProps.placeholder && this.props.placeholder) { const {isEmpty} = this.props.model; if (isEmpty) {