fix lsp bug

This commit is contained in:
Nate 2024-09-14 22:12:40 -07:00
parent 2f4a3d48c6
commit 2349477512

View file

@ -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 [];
}
}