julien-c / epub

node.js epub reader
https://www.npmjs.com/package/epub
Other
333 stars 307 forks source link

Fix "Uncaught TypeError: linkparts.shift is not a function" error #41

Closed christianroy closed 5 years ago

christianroy commented 5 years ago

Sorry I was not able to provide a test for this fix as this happened in copyrighted EPUB which I cannot share. And honestly, I am not sure I quite understand what types of links would trigger the crash... :( But this change fixes it (it avoids calling .shift when linkparts is not an array.

julien-c commented 5 years ago

looks good to me, thanks