Possible nested arrays error
arestov opened this issue · 1 comments
arestov commented
Is it right code?
announce = [[torrent.announce]]
maybe just
announce = [torrent.announce]
?
https://github.com/feross/parse-torrent/blob/master/index.js#L45
if (torrent.announce) {
announce = [[torrent.announce]]
} else {
announce = []
}
feross commented
Thanks for the issue. This is intentional. announce
is supposed to be an array of arrays. So, in the case that torrent.announce
(which is a string) exists, we want to do announce = [[torrent.announce]]
.