Merge pull request #3434 from evhan55/bug/multiple-alerts-locale-switch

Resolves #3336: Prevent multiple peripheral alerts after language switch
This commit is contained in:
Evelyn Eastmond authored and GitHub committed 2018-10-19 14:50:19 -04:00
commit fc746728b3
1 file changed
+1
+1
View File
@@ -55,6 +55,7 @@ const vmListenerHOC = function (WrappedComponent) {
}
}
componentWillUnmount () {
this.props.vm.removeListener('PERIPHERAL_DISCONNECT_ERROR', this.props.onShowAlert);
if (this.props.attachKeyboardEvents) {
document.removeEventListener('keydown', this.handleKeyDown);
document.removeEventListener('keyup', this.handleKeyUp);