diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-07-13 21:49:34 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-07-13 21:49:34 +0900 |
commit | f555e1348c8e383983487a79f797fe06540862f4 (patch) | |
tree | 3f39c20b7e4169370c62d40f31a62022519be550 /src/background | |
parent | 1e39fed6183bf3b10f48eb52868bb5ab3fe3134f (diff) |
Fix command and property completions
Diffstat (limited to 'src/background')
-rw-r--r-- | src/background/shared/completions/index.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/background/shared/completions/index.js b/src/background/shared/completions/index.js index d630f33..4fd37fd 100644 --- a/src/background/shared/completions/index.js +++ b/src/background/shared/completions/index.js @@ -113,6 +113,9 @@ const getSetCompletions = (command, keywords) => { } ]; }).flat(); + if (items.length === 0) { + return Promise.resolve([]); + } return Promise.resolve([ { name: 'Properties', @@ -126,6 +129,10 @@ const complete = (line, settings) => { let words = trimmed.split(/ +/); let name = words[0]; if (words.length === 1) { + let items = completeCommands(name); + if (items.length === 0) { + return Promise.resolve([]); + } return Promise.resolve([ { name: 'Console Command', |