Skip to content

Commit

Permalink
DOCS: fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
GerwinBosch committed Feb 10, 2020
1 parent 5050c96 commit 7ab8bc5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/yasqe/src/autocompleters/prefixes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ var conf: Autocompleter.CompleterConfig = {
(previousToken.type === "punc" &&
(previousToken.string === "|" || previousToken.string === "/" || previousToken.string == "^^")))
) {
// check whether it isnt defined already (saves us from looping
// check whether it isn't defined already (saves us from looping
// through the array)
var currentPrefix = token.string.substring(0, colonIndex + 1);

var queryPrefixes = yasqe.getPrefixesFromQuery();
if (queryPrefixes[currentPrefix.slice(0, -1)] == null) {
// ok, so it isnt added yet!
// ok, so it isn't added yet!
// var completions = yasqe.autocompleters.getTrie(completerName).autoComplete(currentPrefix);
token.autocompletionString = currentPrefix;
yasqe.autocompleters[this.name].getCompletions(token).then(suggestions => {
if (suggestions.length) {
yasqe.addPrefixes(suggestions[0]);
// Re-activate autocompleter after adding prefixes, so another autocompleter can kick in
// Re-activate auto-completer after adding prefixes, so another auto-completer can kick in
yasqe.autocomplete();
}
}, console.warn);
Expand Down

0 comments on commit 7ab8bc5

Please sign in to comment.