Resolves #3336: Prevent multiple peripheral alerts after language has been switched.

This commit is contained in:
Evelyn Eastmond committed 2018-10-19 13:57:04 -04:00
1 parent 06bf3896c8
commit 0de59faab3
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);