Skip to content

Commit

Permalink
Fixed bug where completions are not fetched when cache is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
taichimaeda committed Apr 12, 2024
1 parent 962b586 commit 3aad545
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/api/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ export class MemoryCache implements APIClient {

async fetchCompletions(language: string, prefix: string, suffix: string) {
const { settings } = this.plugin;

if (!settings.cache.enabled) {
return;
const completions = await this.client.fetchCompletions(
language,
prefix,
suffix,
);
return completions;
}

// Extra whitespaces should not affect the completions.
Expand Down

0 comments on commit 3aad545

Please sign in to comment.