From ce5b39d2e39382df2630b1bc0db533ef044c859f Mon Sep 17 00:00:00 2001 From: takurinton Date: Sun, 5 Sep 2021 18:46:16 +0900 Subject: [PATCH] fix: index.ts in svelte-check --- packages/svelte-check/src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } }