diff options
author | dotnetCarpenter <jon.ronnenberg@gmail.com> | 2016-10-20 15:44:15 -0200 |
---|---|---|
committer | dotnetCarpenter <jon.ronnenberg@gmail.com> | 2016-10-20 17:45:17 -0200 |
commit | d07a17de2890bf712a3bd1984e1cbeda2269ba50 (patch) | |
tree | b6fc3b6ac621f82f9546e164b8e2c56d95fa1c78 /src/pointarray.js | |
parent | 0667187ea61e5b1005e2dedcebe64a915a70fc24 (diff) | |
download | svg.js-d07a17de2890bf712a3bd1984e1cbeda2269ba50.tar.gz svg.js-d07a17de2890bf712a3bd1984e1cbeda2269ba50.zip |
replace call to filter function with better regex
Diffstat (limited to 'src/pointarray.js')
-rw-r--r-- | src/pointarray.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pointarray.js b/src/pointarray.js index fc8a7ac..f414f4d 100644 --- a/src/pointarray.js +++ b/src/pointarray.js @@ -48,7 +48,7 @@ SVG.extend(SVG.PointArray, { if (Array.isArray(array)) return array // parse points - array = array.split(/\s|,/).filter(function(a){ return a !== '' }) + array = array.split(/\s+|,/) // validate points - https://svgwg.org/svg2-draft/shapes.html#DataTypePoints // Odd number of coordinates is an error. In such cases, drop the last odd coordinate. |