diff --git a/src/js/views/Wallet/components/LeftNavigation/index.js b/src/js/views/Wallet/components/LeftNavigation/index.js index d7a47423..2e075b1c 100644 --- a/src/js/views/Wallet/components/LeftNavigation/index.js +++ b/src/js/views/Wallet/components/LeftNavigation/index.js @@ -70,16 +70,16 @@ class LeftNavigation extends Component { }); } - componentWillReceiveProps() { - const { deviceDropdownOpened } = this.props; - const { selectedDevice } = this.props.wallet; - const { network } = this.props.location.state; + componentWillReceiveProps(nextProps) { + const { deviceDropdownOpened } = nextProps; + const { selectedDevice } = nextProps.wallet; + const hasNetwork = nextProps.location.state && nextProps.location.state.network; const hasFeatures = selectedDevice && selectedDevice.features; const deviceReady = hasFeatures && !selectedDevice.features.bootloader_mode && selectedDevice.features.initialized; if (deviceDropdownOpened) { this.setState({ shouldRenderDeviceSelection: true }); - } else if (network) { + } else if (hasNetwork) { this.setState({ shouldRenderDeviceSelection: false, animationType: 'slide-left', @@ -135,9 +135,9 @@ class LeftNavigation extends Component { > - {this.state.shouldRenderDeviceSelection && this.getMenuTransition() } + {this.state.shouldRenderDeviceSelection && } {this.shouldRenderAccounts() && this.getMenuTransition()} - {this.shouldRenderCoins() && } + {this.shouldRenderCoins() && this.getMenuTransition()}