mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-13 16:33:28 -04:00
Allow colors to be compare to null.
This commit is contained in:
parent
a59fab0409
commit
5dfec35dc1
1 changed files with 1 additions and 1 deletions
|
@ -161,7 +161,7 @@ var Color = this.Color = Base.extend(new function() {
|
|||
* @return {@true if the GrayColor is the same}
|
||||
*/
|
||||
equals: function(color) {
|
||||
if (color._colorType == this._colorType) {
|
||||
if (color && color._colorType == this._colorType) {
|
||||
for (var i = 0, l = this._components; i < l; i++) {
|
||||
var component = '_' + this._components[i];
|
||||
if (this[component] !== color[component])
|
||||
|
|
Loading…
Reference in a new issue