From adb9f422426ebe44311381c098bdfdf321f72625 Mon Sep 17 00:00:00 2001 From: Chirag Kothari Date: Fri, 16 Nov 2018 12:09:34 +0530 Subject: [PATCH] fix for error when area is not in options --- lib/cmd.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cmd.js b/lib/cmd.js index 5d538c3..99db20c 100644 --- a/lib/cmd.js +++ b/lib/cmd.js @@ -17,7 +17,7 @@ TabulaCommand.prototype.run = function () { TabulaCommand.prototype._build = function (pdfPath, commandArgs) { this.args = ['-jar', path.join(__dirname, 'tabula-java.jar')]; - if (commandArgs["area"].constructor === Array){ + if (commandArgs["area"] && commandArgs["area"].constructor === Array){ var array = commandArgs["area"].map((item)=>{ this.args.push(['-a', item]); });