From 46b131126066314f84e5de883b9b9f2fad8a6a61 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Sat, 21 May 2011 12:06:37 +0200 Subject: [PATCH] Gradient#equals: also check gradient type. --- src/color/Gradient.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/color/Gradient.js b/src/color/Gradient.js index 89160421..cddb7da9 100644 --- a/src/color/Gradient.js +++ b/src/color/Gradient.js @@ -49,6 +49,8 @@ var Gradient = this.Gradient = Base.extend({ }, equals: function(gradient) { + if (gradient.type != this.type) + return false; if (this._stops.length == gradient._stops.length) { for (var i = 0, l = this._stops.length; i < l; i++) { if (!this._stops[i].equals(gradient._stops[i]))