mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 13:48:34 +00:00
fix: reify after sequence to preserve array
ref https://github.com/tidalcycles/strudel/issues/383#issuecomment-1399514090
This commit is contained in:
parent
fdb76867a7
commit
ed7763df92
@ -1632,7 +1632,6 @@ export function register(name, func) {
|
||||
};
|
||||
|
||||
Pattern.prototype[name] = function (...args) {
|
||||
args = args.map(reify);
|
||||
// For methods that take a single argument (plus 'this'), allow
|
||||
// multiple arguments but sequence them
|
||||
if (arity === 2 && args.length !== 1) {
|
||||
@ -1640,6 +1639,7 @@ export function register(name, func) {
|
||||
} else if (arity !== args.length + 1) {
|
||||
throw new Error(`.${name}() expects ${arity - 1} inputs but got ${args.length}.`);
|
||||
}
|
||||
args = args.map(reify);
|
||||
return pfunc(...args, this);
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user