yWorks / svg2pdf.js

A javascript-only SVG to PDF conversion utility that runs in the browser. Brought to you by yWorks - the diagramming experts
MIT License
667 stars 104 forks source link

Cannot read property 'toLowerCase' of undefined #17

Closed psamim closed 7 years ago

psamim commented 7 years ago

Hi,

I get the following error in my browser console.

Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
    at l (bundle.js:493)
    at k (bundle.js:493)
    at U (bundle.js:493)
    at Q (bundle.js:493)
    at Object.<anonymous> (bundle.js:58)
    at __webpack_require__ (bundle.js:20)
    at bundle.js:40
    at bundle.js:43

I have update the my files at my repo, you can reproduce the error:

https://github.com/psamim/svg2pdf.js-test

(npm install , ./node_modules/.bin/webpack ./entry.js bundle.js, then open index.htmll)

Thanks, Samim

psamim commented 7 years ago

The problem was that the SVG file was not started with root svg tag.