From 2d8c6c3d89b0edc0b00d6c2d3a40fb0f7734329e Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Fri, 8 Jul 2016 14:28:29 -0700 Subject: [PATCH] hyperterm: remove active marker correctly when closing a tab and marking a new one as active --- app/hyperterm.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/hyperterm.js b/app/hyperterm.js index b6eae3bf..fc749bae 100644 --- a/app/hyperterm.js +++ b/app/hyperterm.js @@ -407,8 +407,9 @@ export default class HyperTerm extends Component { active = _active - 1; } - if (~activeMarkers.indexOf(active)) { - activeMarkers.splice(active, 1); + const ai2 = activeMarkers.indexOf(active); + if (~ai2) { + activeMarkers.splice(ai2, 1); } this.setState({