aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/background/shared/completions/index.js7
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',