evaluate time with .valueOf

This commit is contained in:
Yotam Mann 2017-12-17 12:53:34 -05:00
parent 410eb5727d
commit 92c7638786
2 changed files with 15 additions and 13 deletions

View file

@ -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;

View file

@ -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 {