diff options
Diffstat (limited to 'src/SVGArray.js')
-rw-r--r-- | src/SVGArray.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/SVGArray.js b/src/SVGArray.js index e7881df..9273833 100644 --- a/src/SVGArray.js +++ b/src/SVGArray.js @@ -12,8 +12,14 @@ let BaseArray = (function() { })() export default class SVGArray extends BaseArray { - constructor (array, fallback) { + constructor (...args) { super() + this.init(...args) + } + + init (array, fallback) { + //this.splice(0, this.length) + this.length = 0 this.push(...this.parse(array || fallback)) } |