From f7f6c4b801172ce119d4ea9a650c543670474784 Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Thu, 8 Nov 2018 14:14:05 +0100 Subject: `fill()` and `stroke()` return the fill and stroke attribute when called as getter (#789) --- src/modules/optional/sugar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/optional/sugar.js b/src/modules/optional/sugar.js index 69f723e..f4c20fc 100644 --- a/src/modules/optional/sugar.js +++ b/src/modules/optional/sugar.js @@ -23,7 +23,7 @@ var sugar = { extension[m] = function (o) { if (typeof o === 'undefined') { - return this + return this.attr(m) } if (typeof o === 'string' || Color.isRgb(o) || (o instanceof Element)) { this.attr(m, o) -- cgit v1.2.3