From 04bedbc9547aeed117550a597f33ebc2efc96fb5 Mon Sep 17 00:00:00 2001 From: Mattermost Build Date: Tue, 8 Oct 2019 14:15:37 +0200 Subject: [PATCH] Fix running mm-i18n that crashes on conditional operators (#3386) --- app/components/sidebars/drawer_layout.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/sidebars/drawer_layout.js b/app/components/sidebars/drawer_layout.js index c7ef74a23..16fe14a16 100644 --- a/app/components/sidebars/drawer_layout.js +++ b/app/components/sidebars/drawer_layout.js @@ -122,7 +122,9 @@ export default class DrawerLayout extends Component { } componentWillUnmount() { - this.openValue?.removeListener(this.handleOpenValueChanged); + if (this.openValue) { + this.openValue.removeListener(this.handleOpenValueChanged); + } Dimensions.removeEventListener('change', this.handleDimensionsChange); }