mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
evaluate time with .valueOf
This commit is contained in:
parent
410eb5727d
commit
92c7638786
2 changed files with 15 additions and 13 deletions
|
@ -42,6 +42,7 @@ define(["Tone/core/Tone", "Tone/type/Type"], function (Tone) {
|
|||
if (Tone.isUndef(event.time) || Tone.isUndef(event.duration)){
|
||||
throw new Error("Tone.IntervalTimeline: events must have time and duration parameters");
|
||||
}
|
||||
event.time = event.time.valueOf();
|
||||
var node = new IntervalNode(event.time, event.time + event.duration, event);
|
||||
if (this._root === null){
|
||||
this._root = node;
|
||||
|
|
|
@ -86,6 +86,7 @@ define(["Tone/core/Tone"], function (Tone) {
|
|||
if (Tone.isUndef(event.time)){
|
||||
throw new Error("Tone.Timeline: events must have a time attribute");
|
||||
}
|
||||
event.time = event.time.valueOf();
|
||||
if (this._iterating){
|
||||
this._toAdd.push(event);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue