From 7d0c13b1f0f2e5575c59cccbaaa720dcf1c20a61 Mon Sep 17 00:00:00 2001 From: Johan Nilsson Date: Fri, 11 Oct 2024 10:33:48 +0200 Subject: [PATCH] fix: crashes --- packages/pigment-css-react/src/processors/css.ts | 5 ++++- packages/pigment-css-unplugin/src/index.ts | 5 +---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/pigment-css-react/src/processors/css.ts b/packages/pigment-css-react/src/processors/css.ts index 7511c7a3..60c78c75 100644 --- a/packages/pigment-css-react/src/processors/css.ts +++ b/packages/pigment-css-react/src/processors/css.ts @@ -68,7 +68,10 @@ export class CssProcessor extends BaseProcessor { if (callType === 'template') { this.handleTemplate(this.callParam, values); } else { - this.handleCall(this.callParam, values); + try { + this.handleCall(this.callParam, values); + } catch(e) { + } } } diff --git a/packages/pigment-css-unplugin/src/index.ts b/packages/pigment-css-unplugin/src/index.ts index 08b426e0..2a75f090 100644 --- a/packages/pigment-css-unplugin/src/index.ts +++ b/packages/pigment-css-unplugin/src/index.ts @@ -356,10 +356,7 @@ export const plugin = createUnplugin((options) => { code: result.code, map: result.sourceMap, }; - } catch (e) { - const error = new Error((e as Error).message); - error.stack = (e as Error).stack; - throw error; + } catch(e) { } }, };