File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ PDF.prototype.exec = function PdfExec (callback) {
121121 // Ignore if code has a value of 0 since that means PhantomJS has executed and exited successfully.
122122 // Also, as per your script and standards, having a code value of 1 means one can always assume that
123123 // an error occured.
124- if ( ( typeof code !== 'undefined' && code !== null ) && code !== 0 ) {
124+ if ( ( ( typeof code !== 'undefined' && code !== null ) && code !== 0 ) || err ) {
125125 var error = null
126126
127127 if ( err ) {
@@ -134,7 +134,7 @@ PDF.prototype.exec = function PdfExec (callback) {
134134
135135 // Append anything caught from the stderr
136136 var postfix = stderr . length ? '\n' + Buffer . concat ( stderr ) . toString ( ) : ''
137- if ( postfix ) err . message += postfix
137+ if ( postfix ) error . message += postfix
138138
139139 return callback ( error )
140140 }
You can’t perform that action at this time.
0 commit comments