fix: only stringify views (#467)

This commit is contained in:
Cas 2023-05-27 18:41:31 +02:00 committed by GitHub
parent 51a6b6d6c0
commit 52f55020f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,7 +70,7 @@ class Client extends EventEmitter {
// Remove trailing slash from trackers to catch duplicates
announce = announce.map(announceUrl => {
announceUrl = arr2text(announceUrl)
if (ArrayBuffer.isView(announceUrl)) announceUrl = arr2text(announceUrl)
if (announceUrl[announceUrl.length - 1] === '/') {
announceUrl = announceUrl.substring(0, announceUrl.length - 1)
}