summaryrefslogtreecommitdiffstats
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
parent8802d25609c26eaa5372662615929fca95a906f9 (diff)
downloadsvg.js-1388b1f67b18cb2bc561840079f981253fa1643e.tar.gz
svg.js-1388b1f67b18cb2bc561840079f981253fa1643e.zip
renamed unit() to `convert()` to avoid name collision3.0.9
-rw-r--r--CHANGELOG.md5
-rw-r--r--package.json2
-rw-r--r--src/types/SVGNumber.js3
3 files changed, 7 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 503e8a1..af23509 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,11 @@ The document follows the conventions described in [“Keep a CHANGELOG”](http:
====
+## [3.0.9] - 2018-01-14
+
+### Fixed
+ - renamed `unit()` to `convert()` due to name collision
+
## [3.0.8] - 2018-01-13
### Fixed
diff --git a/package.json b/package.json
index 0028f7c..8c582d1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@svgdotjs/svg.js",
- "version": "3.0.8",
+ "version": "3.0.9",
"description": "A lightweight library for manipulating and animating SVG.",
"url": "https://svgdotjs.github.io/",
"homepage": "https://svgdotjs.github.io/",
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)
}
}