Skip to content

Commit 7dafe17

Browse files
committed
Added p5.min.js in such a way that it prevents a race condition on the example /advanced-canvas-rendering-multiple-canvases
Signed-off-by: Bryan Hoffman
1 parent fc79369 commit 7dafe17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/CodeEmbed/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useState, useEffect, useRef } from "preact/hooks";
22
import { useLiveRegion } from '../hooks/useLiveRegion';
33
import CodeMirror, { EditorView } from "@uiw/react-codemirror";
44
import { javascript } from "@codemirror/lang-javascript";
5-
import { cdnLibraryUrl, cdnSoundUrl } from "@/src/globals/globals";
5+
import { minifiedLibraryDownloadUrl, cdnLibraryUrl, cdnSoundUrl } from "@/src/globals/globals";
66

77
import { CodeFrame } from "./frame";
88
import { CopyCodeButton } from "../CopyCodeButton";
@@ -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 ? [minifiedLibraryDownloadUrl, cdnSoundUrl] :[minifiedLibraryDownloadUrl]}
100100
/>
101101
</div>
102102
<div className={`flex gap-2.5 ${largeSketch ? "flex-row" : "md:flex-row lg:flex-col"}`}>

0 commit comments

Comments
 (0)