diff --git a/src/renderer.ts b/src/renderer.ts index 763545381..914b4838b 100644 --- a/src/renderer.ts +++ b/src/renderer.ts @@ -169,10 +169,10 @@ class Renderer extends EventEmitter { const div = document.createElement('div') const shadow = div.attachShadow({ mode: 'open' }) - const nonce = this.options.nonce; + const cspNonce = this.options.cspNonce && typeof this.options.cspNonce === 'string' ? this.options.cspNonce.replace(/"/g, '') : ''; shadow.innerHTML = ` -