Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2019-07-24 01:54:57 +0300
committerFeross Aboukhadijeh <feross@feross.org>2019-07-24 01:54:57 +0300
commit57d31391c84e4952b6afb5b6e7fcfcf1ba5e8e2e (patch)
treec0463ea68b0ee6047758574ea9b2700962d0ed23 /lib
parent78d98d9fa45598b63fb0fec013036e35d167f6c3 (diff)
Fix error in Chrome extension environment
Fixes https://github.com/brave/brave-browser/issues/5358
Diffstat (limited to 'lib')
-rw-r--r--lib/server.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/server.js b/lib/server.js
index 64ce12f..0e22cba 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -3,7 +3,7 @@ const http = require('http')
const mime = require('mime')
const pump = require('pump')
const rangeParser = require('range-parser')
-const URL = require('url').URL
+const URL = require('url').URL || window.URL // TODO: remove when we drop Node 8 support
function Server (torrent, opts = {}) {
const server = http.createServer()