Skip to content
Snippets Groups Projects
Commit 0de59faa authored by Evelyn Eastmond's avatar Evelyn Eastmond
Browse files

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

parent 06bf3896
No related branches found
No related tags found
No related merge requests found
...@@ -55,6 +55,7 @@ const vmListenerHOC = function (WrappedComponent) { ...@@ -55,6 +55,7 @@ const vmListenerHOC = function (WrappedComponent) {
} }
} }
componentWillUnmount () { componentWillUnmount () {
this.props.vm.removeListener('PERIPHERAL_DISCONNECT_ERROR', this.props.onShowAlert);
if (this.props.attachKeyboardEvents) { if (this.props.attachKeyboardEvents) {
document.removeEventListener('keydown', this.handleKeyDown); document.removeEventListener('keydown', this.handleKeyDown);
document.removeEventListener('keyup', this.handleKeyUp); document.removeEventListener('keyup', this.handleKeyUp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment