No need to check for colorType since #convert() already performs this optimisation.

This commit is contained in:
Jürg Lehni 2011-05-19 20:19:36 +01:00
parent 3b9369fafb
commit 32fb1b065e

View file

@ -333,9 +333,7 @@ var Color = this.Color = Base.extend(new function() {
toCssString: function() {
if (!this._cssString) {
var color = this._colorType === 'rgb'
? this
: this.convert('rgb');
var color = this.convert('rgb');
var alpha = color.getAlpha();
var components = [
Math.round(color.getRed() * 255),