diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/optional/sugar.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/optional/sugar.js b/src/modules/optional/sugar.js index 3bd61fb..18f3e78 100644 --- a/src/modules/optional/sugar.js +++ b/src/modules/optional/sugar.js @@ -24,7 +24,7 @@ var sugar = { if (typeof o === 'undefined') { return this.attr(m) } - if (typeof o === 'string' || Color.isRgb(o) || (o instanceof Element)) { + if (typeof o === 'string' || o instanceof Color || Color.isRgb(o) || (o instanceof Element)) { this.attr(m, o) } else { // set all attributes from sugar.fill and sugar.stroke list |