From 18dd84b9081fb5552d5b5b2560405496445e2110 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Tue, 19 Jul 2016 03:23:40 -0700 Subject: [PATCH] web: fix flow selection --- web/src/js/ducks/flowView.js | 2 +- web/src/js/ducks/ui.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/js/ducks/flowView.js b/web/src/js/ducks/flowView.js index 1e54fc05c..dd5bea41d 100644 --- a/web/src/js/ducks/flowView.js +++ b/web/src/js/ducks/flowView.js @@ -182,7 +182,7 @@ export function selectRelative(shift) { let minIndex = 0 let maxIndex = getState().flowView.data.length - 1 let newIndex - if (!currentSelectionIndex) { + if (currentSelectionIndex === undefined) { newIndex = (shift < 0) ? minIndex : maxIndex } else { newIndex = currentSelectionIndex + shift diff --git a/web/src/js/ducks/ui.js b/web/src/js/ducks/ui.js index 7cfa984fe..f745f0af2 100644 --- a/web/src/js/ducks/ui.js +++ b/web/src/js/ducks/ui.js @@ -180,7 +180,7 @@ export function onKeyDown(e) { break case Key.ESC: - dispatch(selectFlowRelative(null)) + dispatch(flowsActions.select(null)) break case Key.LEFT: