diff --git a/resources/js/build/wordpress.js b/resources/js/build/wordpress.js index 1671125..d428071 100644 --- a/resources/js/build/wordpress.js +++ b/resources/js/build/wordpress.js @@ -210,7 +210,8 @@ export function wordpressThemeJson({ return; } - const rootContent = themeContent.slice(themeContent.indexOf('{') + 1, themeContent.lastIndexOf('}')) + const endIndex = themeContent.lastIndexOf('}'); + const rootContent = themeContent.slice(themeContent.indexOf('{') + 1, endIndex === -1 ? undefined : endIndex); const colorVariables = {} const colorVarRegex = /--color-([^:]+):\s*([^;}]+)[;}]?/g