add null-guard for stickerpickerWidget in StickerPicker

pull/21833/head
Michael Telatynski 2018-07-13 14:24:29 +01:00 committed by GitHub
parent 7bbb967ddd
commit 4850387ae0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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);