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