mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
Fix bug in Color#equals() resulting in it always returning true.
This commit is contained in:
parent
478002ea1c
commit
b50b0f9e5a
1 changed files with 2 additions and 2 deletions
|
@ -161,8 +161,8 @@ var Color = this.Color = Base.extend(new function() {
|
|||
* @return {@true if the GrayColor is the same}
|
||||
*/
|
||||
equals: function(color) {
|
||||
if (color && color._colorType == this._colorType) {
|
||||
for (var i = 0, l = this._components; i < l; i++) {
|
||||
if (color && color._colorType === this._colorType) {
|
||||
for (var i = 0, l = this._components.length; i < l; i++) {
|
||||
var component = '_' + this._components[i];
|
||||
if (this[component] !== color[component])
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue