tailwind-ctp-intellisense @master -
refs -
log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
diff --git a/src/extension.ts b/src/extension.ts
index c0c3fecf093fc5c02759b58d9f4facfea161e890..5f796c94c1b678aeeb1c99ff1350732c2200f194 100644
--- a/src/extension.ts
+++ b/src/extension.ts
@@ -52,6 +52,11 @@ intellisense.dispose()
return
}
+ if (!tw) {
+ intellisense.dispose()
+ return
+ }
+
intellisense.reload(tw)
}
}
@@ -132,8 +137,10 @@ // match emmet style syntax
// e.g. .flex.items-center
let lineText = text.split('\n').pop()
matches = lineText.match(/\.([^()#>*^ \[\]=$@{}]*)$/i)
- let parts = matches[matches.length - 1].split('.')
- str = parts[parts.length - 1]
+ if (matches) {
+ let parts = matches[matches.length - 1].split('.')
+ str = parts[parts.length - 1]
+ }
}
if (typeof str !== 'undefined') {