mirror of https://github.com/vector-im/riot-web
Fix soft crash when editing message
Fixes https://github.com/matrix-org/riot-web-rageshakes/issues/2504pull/21833/head
parent
31ec984c86
commit
8e405dda2e
|
@ -94,7 +94,8 @@ export default class BasicMessageEditor extends React.Component {
|
||||||
this._emoticonSettingHandle = null;
|
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) {
|
if (this.props.placeholder !== prevProps.placeholder && this.props.placeholder) {
|
||||||
const {isEmpty} = this.props.model;
|
const {isEmpty} = this.props.model;
|
||||||
if (isEmpty) {
|
if (isEmpty) {
|
||||||
|
|
Loading…
Reference in New Issue