From 0458e3d916a010122e6fa943321bc7cf0d4e9723 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Mon, 21 Feb 2011 00:25:45 +0100 Subject: [PATCH 1/2] Check for null in Color#read. --- src/color/Color.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/color/Color.js b/src/color/Color.js index 795e1623..dfe47fe5 100644 --- a/src/color/Color.js +++ b/src/color/Color.js @@ -33,9 +33,10 @@ Color = Base.extend({ statics: { read: function(args, index) { var index = index || 0, length = args.length - index; + console.log(args, length); if (length == 1 && args[index] instanceof Color) { return args[index]; - } else if (length != 0) { + } else if (length != 0 && args[0] !== null) { var rgbColor = new RGBColor(RGBColor.dont); rgbColor.initialize.apply(rgbColor, index > 0 ? Array.prototype.slice.call(args, index) : args); From 14943f428f33ece815b2d4da609098256e795333 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Mon, 21 Feb 2011 00:27:02 +0100 Subject: [PATCH 2/2] Remove logging statement. --- src/color/Color.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/color/Color.js b/src/color/Color.js index dfe47fe5..d233caeb 100644 --- a/src/color/Color.js +++ b/src/color/Color.js @@ -33,7 +33,6 @@ Color = Base.extend({ statics: { read: function(args, index) { var index = index || 0, length = args.length - index; - console.log(args, length); if (length == 1 && args[index] instanceof Color) { return args[index]; } else if (length != 0 && args[0] !== null) {