From 8982688f9eeb2ee6dfff0ca790de3c246bce42e7 Mon Sep 17 00:00:00 2001 From: Yotam Mann Date: Sun, 18 Sep 2016 20:03:04 -0400 Subject: [PATCH] can now pass in Infinity or other valid numbers --- Tone/type/TimeBase.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tone/type/TimeBase.js b/Tone/type/TimeBase.js index 102f83f3..a77dfc3e 100644 --- a/Tone/type/TimeBase.js +++ b/Tone/type/TimeBase.js @@ -28,13 +28,13 @@ define(["Tone/core/Tone"], function (Tone) { if (val instanceof Tone.TimeBase){ this.copy(val); - } else if (!this.isUndef(val) && this.isUndef(units)){ - this.set(val); } else if (!this.isUndef(units) || this.isNumber(val)){ //default units units = this.defaultArg(units, this._defaultUnits); var method = this._primaryExpressions[units].method; this._expr = method.bind(this, val); + } else if (this.isString(val)){ + this.set(val); } else if (this.isUndef(val)){ //default expression this._expr = this._defaultExpr();