mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-17 00:58:09 +00:00
can now pass in Infinity or other valid numbers
This commit is contained in:
parent
ceefac97e7
commit
8982688f9e
1 changed files with 2 additions and 2 deletions
|
@ -28,13 +28,13 @@ define(["Tone/core/Tone"], function (Tone) {
|
||||||
|
|
||||||
if (val instanceof Tone.TimeBase){
|
if (val instanceof Tone.TimeBase){
|
||||||
this.copy(val);
|
this.copy(val);
|
||||||
} else if (!this.isUndef(val) && this.isUndef(units)){
|
|
||||||
this.set(val);
|
|
||||||
} else if (!this.isUndef(units) || this.isNumber(val)){
|
} else if (!this.isUndef(units) || this.isNumber(val)){
|
||||||
//default units
|
//default units
|
||||||
units = this.defaultArg(units, this._defaultUnits);
|
units = this.defaultArg(units, this._defaultUnits);
|
||||||
var method = this._primaryExpressions[units].method;
|
var method = this._primaryExpressions[units].method;
|
||||||
this._expr = method.bind(this, val);
|
this._expr = method.bind(this, val);
|
||||||
|
} else if (this.isString(val)){
|
||||||
|
this.set(val);
|
||||||
} else if (this.isUndef(val)){
|
} else if (this.isUndef(val)){
|
||||||
//default expression
|
//default expression
|
||||||
this._expr = this._defaultExpr();
|
this._expr = this._defaultExpr();
|
||||||
|
|
Loading…
Reference in a new issue