From d6ff05f01524f5076f5d07bfd0887cb767107188 Mon Sep 17 00:00:00 2001 From: DudaGod Date: Thu, 1 Aug 2024 12:23:23 +0300 Subject: [PATCH] fix: do not fail when extend error with snippet --- lib/common-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common-utils.ts b/lib/common-utils.ts index aff185615..5f9401302 100644 --- a/lib/common-utils.ts +++ b/lib/common-utils.ts @@ -331,7 +331,7 @@ const cloneError = (error: T): T => { }; export const mergeSnippetIntoErrorStack = (error: T & { snippet?: string }): T => { - if (!error.snippet) { + if (!error || !error.snippet) { return error; }