mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-22 07:19:57 -05:00
No need to check argument for _colorType since Color.read already performs an instanceof check for us.
This commit is contained in:
parent
b29827443e
commit
d2263b26db
1 changed files with 1 additions and 2 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue