From 1388b1f67b18cb2bc561840079f981253fa1643e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ulrich-Matthias=20Sch=C3=A4fer?= Date: Mon, 14 Jan 2019 09:15:30 +0100 Subject: [PATCH] renamed unit() to `convert()` to avoid name collision --- CHANGELOG.md | 5 +++++ package.json | 2 +- src/types/SVGNumber.js | 3 +-- 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) } } -- 2.39.5