add helper hap.ensureObjectValue

This commit is contained in:
Felix Roos 2023-02-24 10:15:06 +01:00
parent c8f8f02a46
commit 6283273d81
4 changed files with 18 additions and 18 deletions

View file

@ -47,6 +47,7 @@ let startedAt = -1;
*/
Pattern.prototype.osc = function () {
return this.onTrigger(async (time, hap, currentTime, cps = 1) => {
hap.ensureObjectValue();
const osc = await connect();
const cycle = hap.wholeOrPart().begin.valueOf();
const delta = hap.duration.valueOf();