Skip to content

Commit

Permalink
Added null checker
Browse files Browse the repository at this point in the history
  • Loading branch information
micahbule authored and marcbachmann committed May 15, 2019
1 parent a0f4500 commit 9349b6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ PDF.prototype.exec = function PdfExec (callback) {
// Ignore if code has a value of 0 since that means PhantomJS has executed and exited successfully.
// Also, as per your script and standards, having a code value of 1 means one can always assume that
// an error occured.
if (typeof code !== 'undefined' && code !== 0) {
if ((typeof code !== 'undefined' && code !== null) && code !== 0) {

var error = null;

Expand Down

0 comments on commit 9349b6f

Please sign in to comment.