diff --git a/lib/bootstrap.js b/lib/bootstrap.js index 5f1fd0bc..7405e72d 100644 --- a/lib/bootstrap.js +++ b/lib/bootstrap.js @@ -166,7 +166,7 @@ var Base = this.Base = new function() { function each(iter, bind, asArray) { try { - (asArray || asArray == undefined && isArray(this) ? forEach : forIn) + (asArray || asArray === undefined && isArray(this) ? forEach : forIn) .call(this, iterator(iter), bind = bind || this); } catch (e) { if (e !== Base.stop) throw e; diff --git a/src/path/Curve.js b/src/path/Curve.js index 8c923c8a..63968a87 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -174,7 +174,7 @@ var Curve = this.Curve = Base.extend({ getParameter: function(length, t) { var args = this.getCurveValues(); args.push(length); - args.push(t == undefined ? length < 0 ? 1 : 0 : t); + args.push(t === undefined ? length < 0 ? 1 : 0 : t); return Curve.getParameter.apply(Curve, args); }, @@ -310,9 +310,9 @@ var Curve = this.Curve = Base.extend({ statics: { getLength: function(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, a, b) { - if (a == undefined) + if (a === undefined) a = 0; - if (b == undefined) + if (b === undefined) b = 1; if (p1x == c1x && p1y == c1y && p2x == c2x && p2y == c2y) { // Straight line diff --git a/src/path/Path.js b/src/path/Path.js index 076efdf8..bab85186 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -101,7 +101,7 @@ var Path = this.Path = PathItem.extend({ if (segment._path) segment = new Segment(segment); segment._path = this; - if (index == undefined) { + if (index === undefined) { this._segments.push(segment); } else { this._segments.splice(index, 0, segment);