Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/CodeEmbed/frame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ${code.css || ""}
</style>
<!-- If we need an addon script, load p5 the usual way with no caching to make sure
the import order doesn't get messed up. -->
${((code.scripts?.length ?? 0) > 0 ? [cdnLibraryUrl, ...(code.scripts ?? [])] : []).map((src) => `<script type="text/javascript" src="${src}"></script>`).join('\n')}
${((code.scripts?.length ?? 0) > 0 ? [(code.scripts ?? [])] : []).map((src) => `<script type="text/javascript" src="${src}"></script>`).join('\n')}
<body>${code.htmlBody || ""}</body>
<script id="code" type="text/javascript">${wrapSketch(code.js) || ""}</script>
${(code.scripts?.length ?? 0) > 0 ? '' : `
Expand Down
2 changes: 1 addition & 1 deletion src/components/CodeEmbed/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const CodeEmbed = (props) => {
base={props.base}
frameRef={codeFrameRef}
lazyLoad={props.lazyLoad}
scripts={props.includeSound ? [cdnSoundUrl] : []}
scripts={props.includeSound ? [cdnLibraryUrl, cdnSoundUrl] :[cdnLibraryUrl]}
/>
</div>
<div className={`flex gap-2.5 ${largeSketch ? "flex-row" : "md:flex-row lg:flex-col"}`}>
Expand Down