question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Svg.pathToVertices breaking in chrome

See original GitHub issue

calling Matter.Svg.pathToVertices works fine in mobile safari, but in desktop Chrome it returns the error Uncaught TypeError: Cannot read property 'numberOfItems' of undefined

I haven’t tested in all browsers. I’m calling the function using an svg path element and an integer for sampleLength as per the docs

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
liabrucommented, Feb 5, 2018

Seems that the polyfill is currently broken in recent versions of Chrome, see my comment in this thread.

0reactions
eric-budgiecommented, Jan 25, 2018

Looked at the svg example below in chrome and there are no svg’s loading. http://brm.io/matter-js/demo/#svg

Working on a project now using svg’s and it loads fine in both Firefox and Safari when using localhost but in Chrome “Cannot read property ‘numberOfItems’ of undefined”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - Svg.pathToVertices breaking in chrome -
Svg.pathToVertices breaking in chrome. ... Svg.pathToVertices works fine in mobile safari, but in desktop Chrome it returns the error Uncaught TypeError: ...
Read more >
Chrome not rendering SVG referenced via <img> element
I am having issues with google chrome not rendering svg with an img element. This happens when refreshing the page and initial page...
Read more >
Matter.Svg Module - Matter.js Physics Engine API Docs - brm.io
Svg module contains methods for converting SVG images into an array of ... Svg.pathToVertices ... Converts an SVG path into an array of...
Read more >
SVGs not displaying in Chrome (Example)
The file paths are correct, but the SVGs are only displaying broken image icons, and the SVG used for a background image is...
Read more >
Demystifyingish SVG paths | HTTP 203 - YouTube
Cassie Evans (from Greensock) chats to Jake about SVG paths, ... to Google Chrome Developers here → https://goo.gle/ChromeDevs Also, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found