1
0
Fork 0
mirror of synced 2024-10-05 04:25:21 +13:00

Fix error propagation all the way out of processStringSync.

This commit is contained in:
Sam Rose 2024-10-04 11:48:19 +01:00
parent 4fb870e449
commit c247b194c2
No known key found for this signature in database

View file

@ -231,7 +231,11 @@ export function processStringSync(
return process(string) return process(string)
} }
} catch (err: any) { } catch (err: any) {
return input const { noThrow = true } = opts
if (noThrow) {
return input
}
throw err
} }
} }