diff --git a/packages/svelte-check/src/index.ts b/packages/svelte-check/src/index.ts index ad460919e..a795efac3 100644 --- a/packages/svelte-check/src/index.ts +++ b/packages/svelte-check/src/index.ts @@ -92,7 +92,9 @@ async function getDiagnostics( ); return result; } catch (err) { - writer.failure(err); + if (err instanceof Error) { + writer.failure(err); + } return null; } }