From f555e1348c8e383983487a79f797fe06540862f4 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Fri, 13 Jul 2018 21:49:34 +0900 Subject: [PATCH] Fix command and property completions --- src/background/shared/completions/index.js | 7 +++++++ 1 file changed, 7 insertions(+) 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',