Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/loganch/AutoIt-VSCode
Browse files Browse the repository at this point in the history
  • Loading branch information
loganch committed Jan 14, 2023
2 parents e38a098 + ff171dc commit baac143
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ai_completion.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ const getVariableCompletions = (text, firstChar) => {
if (firstChar === '$') {
let pattern = variablePattern.exec(text);
while (pattern) {
[variableName] = pattern;
if (!(variableName in foundVariables)) {
[, variableName] = pattern;
if (variableName !== undefined && !(variableName in foundVariables)) {
foundVariables[variableName] = true;
variables.push(createNewCompletionItem(CompletionItemKind.Variable, variableName));
}
Expand Down
2 changes: 1 addition & 1 deletion src/ai_workspaceSymbols.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function provideWorkspaceSymbols(query) {
const { 1: newName } = variableFound;

// Filter based on search (if it's not empty)
if (!searchFilter.exec(newName)) {
if (newName === undefined || !searchFilter.exec(newName)) {
return false;
}
symbolKind = SymbolKind.Variable;
Expand Down

0 comments on commit baac143

Please sign in to comment.