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

fix file adding on faulty url checker response

This commit is contained in:
Matthias Kretschmann 2019-09-09 18:06:33 +02:00
parent 839140d906
commit 2f741d300e
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -89,10 +89,10 @@ export default class Files extends PureComponent<FilesProps, FilesStates> {
const { contentLength, contentType, found } = response.data.result
file.contentLength = contentLength
file.contentType = contentType
file.compression = cleanupContentType(contentType)
file.found = found
if (contentLength) file.contentLength = contentLength
if (contentType) file.contentType = contentType
if (contentType) file.compression = cleanupContentType(contentType)
if (found) file.found = found
return file
} catch (error) {