diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-12 12:00:03 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-12 13:01:01 +0100 |
commit | 6ea72cae2c761848b7db2c9457fd41c62d0336d6 (patch) | |
tree | 4d62e3f49a8e4922ed520739e4ab9b42b67e9e97 /src/types/SVGArray.js | |
parent | c108c060152add00cac72a4911f6e998ffb4eb83 (diff) | |
download | svg.js-6ea72cae2c761848b7db2c9457fd41c62d0336d6.tar.gz svg.js-6ea72cae2c761848b7db2c9457fd41c62d0336d6.zip |
make List return new lists on method calls, add map to array polyfill so that this works, fix runner
Diffstat (limited to 'src/types/SVGArray.js')
-rw-r--r-- | src/types/SVGArray.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/types/SVGArray.js b/src/types/SVGArray.js index 4fcb500..7f27ec4 100644 --- a/src/types/SVGArray.js +++ b/src/types/SVGArray.js @@ -10,6 +10,8 @@ export default SVGArray extend(SVGArray, { init (arr) { + // This catches the case, that native map tries to create an array with new Array(1) + if (typeof arr === 'number') return this this.length = 0 this.push(...this.parse(arr)) return this |