Merge pull request #1012 from tidalcycles/fix-flok-setcps

fix: await injectPatternMethods
This commit is contained in:
Felix Roos 2024-03-23 15:26:52 +01:00 committed by GitHub
commit 34373a9d73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -106,7 +106,7 @@ export function repl({
const cpm = register('cpm', function (cpm, pat) {
return pat._fast(cpm / 60 / scheduler.cps);
});
evalScope({
return evalScope({
all,
hush,
cpm,
@ -123,7 +123,7 @@ export function repl({
}
try {
updateState({ code, pending: true });
injectPatternMethods();
await injectPatternMethods();
await beforeEval?.({ code });
shouldHush && hush();
let { pattern, meta } = await _evaluate(code, transpiler);