From 78ab06bf9adbcf0f5e265267b84bfa2b2b4f2499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Guti=C3=A9rrez?= Date: Tue, 9 Apr 2019 13:16:39 +0200 Subject: [PATCH] Fix lint errors. --- src/brizo/Brizo.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/brizo/Brizo.ts b/src/brizo/Brizo.ts index 2f6c09b..cb191ab 100644 --- a/src/brizo/Brizo.ts +++ b/src/brizo/Brizo.ts @@ -136,19 +136,19 @@ export class Brizo extends Instantiable { .getConnector() .get(url) - const filename = response.headers.get('content-disposition').match(/attachment;filename=(.+)/)[1] + const filename = response.headers.get("content-disposition").match(/attachment;filename=(.+)/)[1] await new Promise(async (resolve, reject) => { fs.mkdirSync(destination, {recursive: true}) - const fileStream = fs.createWriteStream(`${destination}${filename}`); - response.body.pipe(fileStream); - response.body.on("error", reject); - fileStream.on("finish", resolve); - }); + const fileStream = fs.createWriteStream(`${destination}${filename}`) + response.body.pipe(fileStream) + response.body.on("error", reject) + fileStream.on("finish", resolve) + }) return destination } else { - window.open(url, '_blank') + window.open(url, "_blank") } } }