No need to check argument for _colorType since Color.read already performs an instanceof check for us.

This commit is contained in:
Jürg Lehni 2011-05-26 09:20:58 +01:00
parent b29827443e
commit d2263b26db

View file

@ -159,8 +159,7 @@ var Color = this.Color = Base.extend(new function() {
} else { } else {
// Called on a subclass instance. Return the converted // Called on a subclass instance. Return the converted
// color. // color.
return (arg._colorType ? arg : Color.read(arguments)) return Color.read(arguments).convert(type);
.convert(type);
} }
} else if (typeof arg === 'string') { } else if (typeof arg === 'string') {
var rgbColor = arg.match(/^#[0-9a-f]{3,6}$/i) var rgbColor = arg.match(/^#[0-9a-f]{3,6}$/i)