Skip to content

Commit

Permalink
fix: don't show hover if styles aren't able to be statically analyzed
Browse files Browse the repository at this point in the history
  • Loading branch information
Yash-Singh1 committed Apr 11, 2024
1 parent 686f2bc commit 0d7576a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/src/capabilities/hover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@ async function onHover({
stylexConfig,
)};`,
);
} else {
return States.EXIT;
}
} else if ("id" in staticValue) {
cssLines.push(
Expand All @@ -390,7 +392,11 @@ async function onHover({
: `var(--${staticValue.id})`
};`,
);
} else {
return States.EXIT;
}
} else {
return States.EXIT;
}

cssLines.push(`${indentation.slice(2)}}`);
Expand Down

0 comments on commit 0d7576a

Please sign in to comment.