1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

fix urlCheck crash

This commit is contained in:
Jernej Pregelj 2019-04-01 14:36:14 +02:00 committed by Matthias Kretschmann
parent 552ab091e5
commit 1ab7e17e39
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -22,7 +22,7 @@ export class UrlCheckRouter {
headers: { Range: 'bytes=0-' } headers: { Range: 'bytes=0-' }
}, },
(error, response) => { (error, response) => {
if (response.statusCode.toString().startsWith('2')) { if (response && response.statusCode.toString().startsWith('2')) {
const result: any = {} const result: any = {}
result.found = true result.found = true