File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ const EventEmitter = require('events')
33const once = require ( 'once' )
44const parallel = require ( 'run-parallel' )
55const Peer = require ( 'simple-peer' )
6- const uniq = require ( 'uniq' )
76
87const common = require ( './lib/common' )
98const HTTPTracker = require ( './lib/client/http-tracker' ) // empty object in browser
@@ -71,7 +70,8 @@ class Client extends EventEmitter {
7170 }
7271 return announceUrl
7372 } )
74- announce = uniq ( announce )
73+ // remove duplicates by converting to Set and back
74+ announce = Array . from ( new Set ( announce ) )
7575
7676 const webrtcSupport = this . _wrtc !== false && ( ! ! this . _wrtc || Peer . WEBRTC_SUPPORT )
7777
Original file line number Diff line number Diff line change 4242 "simple-peer" : " ^9.0.0" ,
4343 "simple-websocket" : " ^8.0.0" ,
4444 "string2compact" : " ^1.1.1" ,
45- "uniq" : " ^1.0.1" ,
4645 "unordered-array-remove" : " ^1.0.2" ,
4746 "ws" : " ^7.0.0"
4847 },
You can’t perform that action at this time.
0 commit comments