From 8db779388f260631286332aec6cb6a448a29d791 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Fri, 13 Jul 2018 21:59:23 +0900 Subject: [PATCH] Fix error on no completion items --- src/console/reducers/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/console/reducers/index.js b/src/console/reducers/index.js index 71b0776..043689c 100644 --- a/src/console/reducers/index.js +++ b/src/console/reducers/index.js @@ -11,6 +11,9 @@ const defaultState = { }; const nextSelection = (state) => { + if (state.completions.length === 0) { + return [-1, -1]; + }; if (state.groupSelection < 0) { return [0, 0]; }