Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
Fix flakiness caused by expired cache entries
Brad Cornes <hello@bradley.dev>
2 years ago
1 changed files, 4 additions(+), 2 deletions(-)
M packages/tailwindcss-language-service/src/util/getLanguageBoundaries.ts -> packages/tailwindcss-language-service/src/util/getLanguageBoundaries.ts
diff --git a/packages/tailwindcss-language-service/src/util/getLanguageBoundaries.ts b/packages/tailwindcss-language-service/src/util/getLanguageBoundaries.ts
index d4bb4a0f93c7707248e5cf423040c03e0669dfa4..bbe36ba68d407ebe4460cbf9095b9d689d148d17 100644
--- a/packages/tailwindcss-language-service/src/util/getLanguageBoundaries.ts
+++ b/packages/tailwindcss-language-service/src/util/getLanguageBoundaries.ts
@@ -96,8 +96,10 @@   doc: TextDocument,
   text: string = doc.getText()
 ): LanguageBoundary[] | null {
   let cacheKey = `${doc.languageId}:${text}`
-  if (cache.has(cacheKey)) {
-    return cache.get(cacheKey)
+
+  let cachedBoundaries = cache.get(cacheKey)
+  if (cachedBoundaries !== undefined) {
+    return cachedBoundaries
   }
 
   let defaultType = isVueDoc(doc)