diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2019-04-26 07:52:44 +0200 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2019-04-26 07:52:44 +0200 |
commit | 1938355670b6dc9acf29199fb381e51bf1b72a70 (patch) | |
tree | aa0fc2b12aabfcb899f7d4eba8833021d611962a | |
parent | 5565aacf2187b5747204aea3eea3be44d994904a (diff) | |
download | svg.js-1938355670b6dc9acf29199fb381e51bf1b72a70.tar.gz svg.js-1938355670b6dc9acf29199fb381e51bf1b72a70.zip |
fix transform getter when something is 0. Make sure only needed files are uploaded to npm
-rw-r--r-- | package.json | 5 | ||||
-rw-r--r-- | src/modules/optional/transform.js | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/package.json b/package.json index dfb8073..f209564 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,11 @@ "jsdelivr": "dist/svg.min.js", "browser": "src/main.js", "module": "src/main.js", + "files": [ + "/dist", + "/src", + "/svg.js.d.ts" + ], "maintainers": [ { "name": "Wout Fierens", diff --git a/src/modules/optional/transform.js b/src/modules/optional/transform.js index 0d0c7e3..d57c428 100644 --- a/src/modules/optional/transform.js +++ b/src/modules/optional/transform.js @@ -55,7 +55,7 @@ export function transform (o, relative) { // Act as a getter if no object was passed if (o == null || typeof o === 'string') { var decomposed = new Matrix(this).decompose() - return decomposed[o] || decomposed + return o == null ? decomposed : decomposed[o] } if (!Matrix.isMatrixLike(o)) { |