From b20b4979b49d31eb6a3c764218dacb84a514b651 Mon Sep 17 00:00:00 2001 From: Steffen Langer <13887114+SteffenLanger@users.noreply.github.com> Date: Thu, 4 Oct 2018 19:09:21 +0200 Subject: [PATCH] Throw error if pdfImage.numberOfPages() fails Before, numberOfPages() failed silently if the tool "pdfinfo" was not installed. --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 4fa6231..fdfed8f 100644 --- a/index.js +++ b/index.js @@ -157,7 +157,9 @@ PDFImage.prototype = { }).catch(function(error){ reject(error); }); - }); + }).catch((error) => { + reject(error); + }); }); }, convertPage: function (pageNumber) {