tailwind-ctp-intellisense @master -
refs -
log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
diff --git a/packages/tailwindcss-language-service/src/util/jit.ts b/packages/tailwindcss-language-service/src/util/jit.ts
index d203b564b59b9bf7159ccd6e6791337958f4cb1c..f31b7fda57d553925055bee06da36ee8f2cb13e5 100644
--- a/packages/tailwindcss-language-service/src/util/jit.ts
+++ b/packages/tailwindcss-language-service/src/util/jit.ts
@@ -90,7 +90,7 @@ export function getRuleContext(state: State, rule: Rule, className: string): string[] {
let context: string[] = [replaceClassName(state, rule.selector, className, '__placeholder__')]
let p: Container = rule
- while (p.parent.type !== 'root') {
+ while (p.parent && p.parent.type !== 'root') {
p = p.parent
if (p.type === 'atrule') {
// @ts-ignore