We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1903ffb commit aa5ca9fCopy full SHA for aa5ca9f
src/components/CodeEmbed/frame.tsx
@@ -42,7 +42,7 @@ canvas {
42
}
43
${code.css || ""}
44
</style>
45
-${(code.scripts ? [cdnLibraryUrl, ...code.scripts] : []).map((src) => `<script type="text/javascript" src="${src}"></script>`).join('\n')}
+${((code.scripts?.length ?? 0) > 0 ? [cdnLibraryUrl, ...(code.scripts ?? [])] : []).map((src) => `<script type="text/javascript" src="${src}"></script>`).join('\n')}
46
<body>${code.htmlBody || ""}</body>
47
<script id="code" type="text/javascript">${wrapSketch(code.js) || ""}</script>
48
${(code.scripts?.length ?? 0) > 0 ? '' : `
0 commit comments