Fix running mm-i18n that crashes on conditional operators (#3385)

This commit is contained in:
Elias Nahum 2019-10-08 15:13:03 +03:00 committed by GitHub
parent bbd22b8f7f
commit ed11cf9b6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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