From 4850387ae03508865a347b237ed18e83d988bf41 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 13 Jul 2018 14:24:29 +0100 Subject: [PATCH] add null-guard for stickerpickerWidget in StickerPicker --- src/components/views/rooms/Stickerpicker.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/views/rooms/Stickerpicker.js b/src/components/views/rooms/Stickerpicker.js index 3452e27102..841cfb9b03 100644 --- a/src/components/views/rooms/Stickerpicker.js +++ b/src/components/views/rooms/Stickerpicker.js @@ -166,6 +166,7 @@ export default class Stickerpicker extends React.Component { } _sendVisibilityToWidget(visible) { + if (!this.state.stickerpickerWidget) return; const widgetMessaging = ActiveWidgetStore.getWidgetMessaging(this.state.stickerpickerWidget.id); if (widgetMessaging && visible !== this._prevSentVisibility) { widgetMessaging.sendVisibility(visible);