Skip to content

Commit aeb8782

Browse files
committed
Make p5.sound regex more permissive
1 parent d6ff5ac commit aeb8782

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/modules/IDE/hooks/useP5Version.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ export function P5VersionProvider(props) {
204204
...dom.documentElement.querySelectorAll('script')
205205
].find((s) =>
206206
[
207-
/^https?:\/\/cdnjs.cloudflare.com\/ajax\/libs\/p5.js\/(.+)\/addons\/p5\.sound\.min\.js$/,
208-
/^https?:\/\/cdn.jsdelivr.net\/npm\/p5@(.+)\/lib\/addons\/p5\.sound\.min\.js$/
207+
/^https?:\/\/cdnjs.cloudflare.com\/ajax\/libs\/p5.js\/(.+)\/addons\/p5\.sound(?:\.min)?\.js$/,
208+
/^https?:\/\/cdn.jsdelivr.net\/npm\/p5@(.+)\/lib\/addons\/p5\.sound(?:\.min)?\.js$/
209209
].some((regex) => regex.exec(s.getAttribute('src') || ''))
210210
);
211211
const setP5Sound = function (enabled) {

0 commit comments

Comments
 (0)