Explorar o código

fix(DownloaderBase): fix header types for upstream changes

evshiron %!s(int64=8) %!d(string=hai) anos
pai
achega
e67353a83d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/lib/common/DownloaderBase.ts

+ 1 - 1
src/lib/common/DownloaderBase.ts

@@ -108,7 +108,7 @@ export abstract class DownloaderBase {
         return new Promise((resolve, reject) => {
             request.head(url)
             .on('error', reject)
-            .on('response', res => resolve(parseInt(res.headers['content-length'], 10)));
+            .on('response', res => resolve(parseInt(<string>(res.headers['content-length']), 10)));
         });
     }