From 81558cb54fb96f6dd1ccddcf4ce9466b762723f3 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Sat, 21 May 2011 17:49:54 +0200 Subject: [PATCH] Avoid double lookup of component key. --- 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 59e1eaa4..e5c1dca2 100644 --- a/src/color/Color.js +++ b/src/color/Color.js @@ -263,7 +263,8 @@ var Color = this.Color = Base.extend(new function() { color[component] = value; color = color.convert(this._colorType); for (var i = 0, l = this._components.length; i < l; i++) { - this[this._components[i]] = color[this._components[i]]; + var component = this._components[i]; + this[component] = color[component]; } }; });