Skip to content

Commit

Permalink
Update index.jsx - undo commit (throw error instead of return)
Browse files Browse the repository at this point in the history
  • Loading branch information
edemirbag committed May 15, 2024
1 parent 394a77a commit 558d5c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/snippet/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`);
Expand Down

0 comments on commit 558d5c3

Please sign in to comment.