From 7a79995727ff44ba2c371147af873efe064bd471 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 2 Dec 2022 13:34:05 +0100 Subject: [PATCH] do not recompile orc --- packages/csound/csound.mjs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/csound/csound.mjs b/packages/csound/csound.mjs index 0d9c6d05..cc453a5e 100644 --- a/packages/csound/csound.mjs +++ b/packages/csound/csound.mjs @@ -113,7 +113,9 @@ export async function loadOrc(url) { url = `https://raw.githubusercontent.com/${path}`; } if (!orcCache[url]) { - orcCache[url] = await fetch(url).then((res) => res.text()); + orcCache[url] = fetch(url) + .then((res) => res.text()) + .then((code) => _csound.compileOrc(code)); } - await _csound.compileOrc(orcCache[url]); + await orcCache[url]; }