Skip to content

Commit 17e14e3

Browse files
authored
Merge branch 'main' into fix-issue-1155
2 parents 3a7b579 + d783895 commit 17e14e3

File tree

5 files changed

+542
-6
lines changed

5 files changed

+542
-6
lines changed

src/components/CodeEmbed/frame.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ ${code.css || ""}
4444
</style>
4545
<!-- If we need an addon script, load p5 the usual way with no caching to make sure
4646
the import order doesn't get messed up. -->
47-
${((code.scripts?.length ?? 0) > 0 ? [cdnLibraryUrl, ...(code.scripts ?? [])] : []).map((src) => `<script type="text/javascript" src="${src}"></script>`).join('\n')}
47+
${((code.scripts?.length ?? 0) > 0 ? [(code.scripts ?? [])] : []).map((src) => `<script type="text/javascript" src="${src}"></script>`).join('\n')}
4848
<body>${code.htmlBody || ""}</body>
4949
<script id="code" type="text/javascript">${wrapSketch(code.js) || ""}</script>
5050
${(code.scripts?.length ?? 0) > 0 ? '' : `

src/components/CodeEmbed/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const CodeEmbed = (props) => {
9696
base={props.base}
9797
frameRef={codeFrameRef}
9898
lazyLoad={props.lazyLoad}
99-
scripts={props.includeSound ? [cdnSoundUrl] : []}
99+
scripts={props.includeSound ? [cdnLibraryUrl, cdnSoundUrl] :[cdnLibraryUrl]}
100100
/>
101101
</div>
102102
<div className={`flex gap-2.5 ${largeSketch ? "flex-row" : "md:flex-row lg:flex-col"}`}>

0 commit comments

Comments
 (0)