Comparing version 11.0.7 to 11.0.8
12
index.js
@@ -235,8 +235,10 @@ const WebTorrent = require('webtorrent') | ||
if (path.extname(pathToData)) { | ||
return mainData.files.find(file => { return pathToData === file.urlPath }) | ||
const checkFile = mainData.files.find(file => { return pathToData === file.urlPath }) | ||
return checkFile ? checkFile : null | ||
} else { | ||
return mainData.files.filter(file => {return file.urlPath.startsWith(pathToData)}) | ||
const checkFolder = mainData.files.filter(file => { return file.urlPath.startsWith(pathToData) }) | ||
return checkFolder.length ? checkFolder : null | ||
} | ||
} else { | ||
return null | ||
return undefined | ||
} | ||
@@ -284,3 +286,3 @@ } | ||
const testTorrent = this.checkForTorrent(id.infohash, pathToData) | ||
if(testTorrent !== null){ | ||
if(testTorrent !== undefined){ | ||
return testTorrent | ||
@@ -320,3 +322,3 @@ } | ||
const testTorrent = this.checkForTorrent(id.address, pathToData) | ||
if(testTorrent !== null){ | ||
if(testTorrent !== undefined){ | ||
return testTorrent | ||
@@ -323,0 +325,0 @@ } |
{ | ||
"name": "torrentz", | ||
"version": "11.0.7", | ||
"version": "11.0.8", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36749
734