Skip to content

Commit

Permalink
don't swallow error if it's a syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie committed Feb 23, 2021
1 parent 8026b79 commit b00df52
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ const configForComponent = (
'default' in componentConfig ? componentConfig.default : componentConfig;
return fn(rootTheme);
} catch (error) {
log(error);
if (error instanceof SyntaxError) {
throw error;
} else {
log(error);
}

return {};
}
};
Expand Down

0 comments on commit b00df52

Please sign in to comment.