Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upUncaught TypeError: item.path.shift is not a function #1706
Comments
This comment has been minimized.
This comment has been minimized.
|
I haven't been able to pin down the source of this. A code example that can reliably reproduce this issue in Chrome would be most helpful! Related: webtorrent/create-torrent#98 |
This comment has been minimized.
This comment has been minimized.
|
It's actually coming from here: https://github.com/webtorrent/create-torrent/blob/fb1d634529a87c04c58217fa2d8c8d4c8e016234/index.js#L131 Closing this issue in favour of the issue you linked. I didn't realise the issue was coming from Will continue discussion there. I can reliably reproduce the issue so will see if there are any tests that can cover this or make a small project to share. (Larger project is not ready to open-source yet). Cheers. |
This comment has been minimized.
This comment has been minimized.
|
@arranlomas Sounds good, thanks |
I have seen this issue raised previously with regards to brave (eg. #526). I am having this issue in chrome.
I am using the typescript type definitions here: https://www.npmjs.com/package/@types/webtorrent
It only happens if I add multiple files with the same prefix, for example
download 1anddownload 2What version of this package are you using?
0.107.3
What operating system, Node.js, and npm version?
node: v10.16.2
npm: 6.9.0
browser: chrome 76.0.3809.100
What happened?
When adding multiple torrents with
File[]Uncaught TypeError: item.path.shift is not a functionis thrownWhat did you expect to happen?🙏 . Expect files to be added as with files without the same prefix.
No error plz
Are you willing to submit a pull request to fix this bug?
Yes
Thanks for this excellent library, very interesting project!