aboutsummaryrefslogtreecommitdiffstats
path: root/src/types/SVGNumber.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2019-01-14 09:15:30 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2019-01-14 09:15:30 +0100
commit1388b1f67b18cb2bc561840079f981253fa1643e (patch)
tree5245e0dd73c581bbc3313cf6cc72dd011d653d01 /src/types/SVGNumber.js
parent8802d25609c26eaa5372662615929fca95a906f9 (diff)
downloadsvg.js-1388b1f67b18cb2bc561840079f981253fa1643e.tar.gz
svg.js-1388b1f67b18cb2bc561840079f981253fa1643e.zip
renamed unit() to `convert()` to avoid name collision3.0.9
Diffstat (limited to 'src/types/SVGNumber.js')
-rw-r--r--src/types/SVGNumber.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/types/SVGNumber.js b/src/types/SVGNumber.js
index 4ead46b..fedb00e 100644
--- a/src/types/SVGNumber.js
+++ b/src/types/SVGNumber.js
@@ -89,8 +89,7 @@ export default class SVGNumber {
return new SVGNumber(this / number, this.unit || number.unit)
}
- unit (unit) {
- if (unit == null) return this.unit
+ convert (unit) {
return new SVGNumber(this.value, unit)
}
}