Unverified Commit 61729da4 authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

[metadata] fix nonce prop for hoist script (#80174)

### What

Only render `nonce` prop on icon hoist script when it's presented
parent 69ded21f
...@@ -15,6 +15,6 @@ export function createServerInsertedMetadata(nonce: string | undefined) { ...@@ -15,6 +15,6 @@ export function createServerInsertedMetadata(nonce: string | undefined) {
} }
inserted = true inserted = true
return `<script nonce="${nonce}">${REINSERT_ICON_SCRIPT}</script>` return `<script ${nonce ? `nonce="${nonce}"` : ''}>${REINSERT_ICON_SCRIPT}</script>`
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment