From 6fd3d1577beb8c6fc3c4445e11475a730ae5db31 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Wed, 16 Sep 2020 03:15:28 -0400 Subject: [PATCH] Fix code style --- package.json | 3 ++- src/js/pdf.js | 13 ++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index c671c75..c33fd38 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,8 @@ "production": "webpack --mode production --progress --hide-modules", "coverage": "open coverage/lcov-report/index.html", "coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", - "start": "webpack-dev-server --public http://localhost:8080/test/manual --open" + "start": "webpack-dev-server --public http://localhost:8080/test/manual --open", + "standard:fix": "standard --fix" }, "author": "Rodrigo Vieira ", "standard": { diff --git a/src/js/pdf.js b/src/js/pdf.js index 6ba654c..7e06324 100644 --- a/src/js/pdf.js +++ b/src/js/pdf.js @@ -19,14 +19,13 @@ export default { const req = new window.XMLHttpRequest() req.responseType = 'arraybuffer' - req.addEventListener('error',() =>{ - cleanUp(params) - params.onError(req.statusText) + req.addEventListener('error', () => { + cleanUp(params) + params.onError(req.statusText) + + // Since we don't have a pdf document available, we will stop the print job + }) - // Since we don't have a pdf document available, we will stop the print job - return - }); - req.addEventListener('load', () => { // Check for errors if ([200, 201].indexOf(req.status) === -1) {