bugfix zoom stepcount (#1301)

* bugfix zoom stepcount
This commit is contained in:
Alex McLean 2025-03-02 10:58:46 +00:00 committed by GitHub
parent 690b8648a8
commit fece4e8b57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2043,7 +2043,7 @@ export const zoom = register('zoom', function (s, e, pat) {
return nothing;
}
const d = e.sub(s);
const steps = __steps ? pat._steps.mulmaybe(d) : undefined;
const steps = __steps ? pat._steps?.mulmaybe(d) : undefined;
return pat
.withQuerySpan((span) => span.withCycle((t) => t.mul(d).add(s)))
.withHapSpan((span) => span.withCycle((t) => t.sub(s).div(d)))