summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sugar.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sugar.js b/src/sugar.js
index 9630b3d..57682e8 100644
--- a/src/sugar.js
+++ b/src/sugar.js
@@ -15,9 +15,9 @@ var _colorPrefix = function(type, attr) {
extension[method] = function(o) {
var indexOf
- if (typeof o == 'string' || SVG.Color.isRgb(o))
+ if (typeof o == 'string' || SVG.Color.isRgb(o) || (o && typeof o.fill === 'function'))
this.attr(method, o)
-
+
else
/* set all attributes from _fillAttr and _strokeAttr list */
for (index = SVG['_' + method].length - 1; index >= 0; index--)