Revert "fix(js): do not fire dangerouslySetInnerHTML if there is nothing to render. Closes #4075"

This reverts commit d91c42bafd9136805fd64018f0db517156bcb263.

Closes #4112
This commit is contained in:
Gabe Kangas
2025-01-14 08:30:01 -08:00
parent 0105473350
commit 04f4ee0018
2 changed files with 11 additions and 15 deletions

View File

@@ -27,26 +27,22 @@ export const Theme: FC = () => {
<Head> <Head>
<meta name="theme-color" content={themeColor} /> <meta name="theme-color" content={themeColor} />
</Head> </Head>
{(appearanceVariables?.keys?.length || 0) > 0 && ( <style
<style dangerouslySetInnerHTML={{
dangerouslySetInnerHTML={{ __html: `
__html: `
:root { :root {
${appearanceVars.join(';\n')} ${appearanceVars.join(';\n')}
} }
`, `,
}} }}
/> />
)} <style
{customStyles !== '' && ( dangerouslySetInnerHTML={{
<style __html: `
dangerouslySetInnerHTML={{
__html: `
${customStyles} ${customStyles}
`, `,
}} }}
/> />
)}
</> </>
); );
}; };

View File

@@ -146,4 +146,4 @@
"emoji-mart": "5.2.2" "emoji-mart": "5.2.2"
} }
} }
} }