Gradient#setStops: improve checking for array.

This commit is contained in:
Jonathan Puckey 2011-05-16 15:46:25 +02:00
parent 06f738d4db
commit 2be70ae73f

View file

@ -41,7 +41,7 @@ var Gradient = this.Gradient = Base.extend({
var rampPoint;
var stop = stops[i];
// If it is an array, the second argument is the rampPoint:
if (stop.length) {
if (Array.isArray(stop)) {
rampPoint = stop[1];
stop = stop[0];
} else {