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 }