Our site suddenly stopped working with Chrome (chrome only) after the last update ...
Indicated error
Uncaught TypeError: Cannot read property 'numberOfItems' of undefined
The numberOfItems property is used here:
// Absolutize and parse path to array , parse: function(array) { /* if it already is a patharray, no need to parse it */ if (array instanceof SVG.PathArray) return array.valueOf() /* prepare for parsing */ var i, il, x0, y0, x1, y1, x2, y2, s, seg, segs , x = 0 , y = 0 /* populate working path */ SVG.parser.path.setAttribute('d', typeof array === 'string' ? array : arrayToString(array)) /* get segments */ segs = SVG.parser.path.pathSegList for (i = 0, il = segs.numberOfItems; i < il; ++i) { seg = segs.getItem(i) s = seg.pathSegTypeAsLetter etc. (I didn't put the whole loop)
Why did SVG and Javascript stop reading this property after the last Chrome update? What could be a good solution?
Thanks!!
source share