From c10cdd3aafe1e3a1ea532d46e5fd525e3b00a6ae Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Fri, 4 Oct 2024 11:56:55 +0100 Subject: [PATCH] Fix undefined error. --- packages/string-templates/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/string-templates/src/index.ts b/packages/string-templates/src/index.ts index 1881ed3b26..c2be63978d 100644 --- a/packages/string-templates/src/index.ts +++ b/packages/string-templates/src/index.ts @@ -231,7 +231,7 @@ export function processStringSync( return process(string) } } catch (err: any) { - const { noThrow = true } = opts + const { noThrow = true } = opts || {} if (noThrow) { return input }