fix lsp bug
This commit is contained in:
parent
2f4a3d48c6
commit
2349477512
1 changed files with 4 additions and 2 deletions
|
|
@ -59,13 +59,15 @@ export async function executeGotoProvider(
|
|||
if (gotoCache.size >= MAX_CACHE_SIZE) {
|
||||
// Remove the oldest item from the cache
|
||||
const oldestKey = gotoCache.keys().next().value;
|
||||
gotoCache.delete(oldestKey);
|
||||
if (oldestKey) {
|
||||
gotoCache.delete(oldestKey);
|
||||
}
|
||||
}
|
||||
gotoCache.set(cacheKey, results);
|
||||
|
||||
return results;
|
||||
} catch (e) {
|
||||
console.warn(`Error executing ${name}:`, e);
|
||||
console.warn(`Error executing ${input.name}:`, e);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue