diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-07-13 21:59:23 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-07-13 21:59:23 +0900 |
commit | 8db779388f260631286332aec6cb6a448a29d791 (patch) | |
tree | 3ab0658c3c4be0660ae061580a1fc90a94c14ab3 | |
parent | f555e1348c8e383983487a79f797fe06540862f4 (diff) |
Fix error on no completion items
-rw-r--r-- | src/console/reducers/index.js | 3 |
1 files changed, 3 insertions, 0 deletions
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]; } |