Skip to content

Commit 42ca9c3

Browse files
authored
fix(stylelint): handle empty result (#284)
1 parent c2d6e6d commit 42ca9c3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

packages/vite-plugin-checker/src/logger.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -401,11 +401,7 @@ export function normalizeStylelintDiagnostic(
401401

402402
const loc = lineColLocToBabelLoc(d)
403403

404-
const codeFrame = createFrame(
405-
// @ts-ignore
406-
diagnostic._postcssResult.css ?? '',
407-
loc,
408-
)
404+
const codeFrame = createFrame(diagnostic._postcssResult?.css ?? '', loc)
409405

410406
return {
411407
message: `${d.text} (${d.rule})`,

0 commit comments

Comments
 (0)