1
0
mirror of https://github.com/SomboChea/ui synced 2026-01-17 00:25:50 +07:00

chore: improve types and checks

This commit is contained in:
Juan Picado @jotadeveloper
2019-07-28 17:51:46 +02:00
parent 12974ea54f
commit 62431038bb
2 changed files with 3 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ function handleResponseType(response: Response): Promise<[boolean, Blob | string
}
// unfortunatelly on download files there is no header available
if (response.url.match(/tgz/).length > 0) {
if (response.url && response.url.match(/.tgz/) !== null) {
return Promise.all([response.ok, response.blob()]);
}
}