From 558d5c388ab1bc818a07028f4ba794b2806c8af1 Mon Sep 17 00:00:00 2001 From: Emir Demirbag <17883910+edemirbag@users.noreply.github.com> Date: Wed, 15 May 2024 12:44:42 +0100 Subject: [PATCH] Update index.jsx - undo commit (throw error instead of return) --- src/snippet/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/snippet/index.jsx b/src/snippet/index.jsx index 141620c..1aa8c9c 100644 --- a/src/snippet/index.jsx +++ b/src/snippet/index.jsx @@ -24,7 +24,7 @@ export const Snippet = ({ content, children, optional, fallback, ...props }) => } if (str === undefined) { - return `Failed to lookup content snippet: ${children}`; + throw new Error(`Failed to lookup content snippet: ${children}`); } if (typeof str !== 'string') { throw new Error(`Invalid content snippet for key ${children}: ${JSON.stringify(str)}`);