Skip to content

Commit 27b27af

Browse files
committed
fix: customTheme error
1 parent 3a90902 commit 27b27af

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pages/index.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,8 @@ export default function Home() {
7878
useEffect(() => {
7979
let customTheme
8080
try {
81-
customTheme = JSON.parse(config.customTheme)
82-
} catch (error) {
83-
return
84-
}
81+
customTheme = JSON.parse(config.customTheme.trim())
82+
} catch (error) { /* empty */ }
8583
const result = CssToTailwindTranslator(cssCode, { ...config, customTheme })
8684
if (result.code === 'SyntaxError') {
8785
toast.error(

0 commit comments

Comments
 (0)