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) {
121
121
// Ignore if code has a value of 0 since that means PhantomJS has executed and exited successfully.
122
122
// Also, as per your script and standards, having a code value of 1 means one can always assume that
123
123
// an error occured.
124
- if ( ( typeof code !== 'undefined' && code !== null ) && code !== 0 ) {
124
+ if ( ( ( typeof code !== 'undefined' && code !== null ) && code !== 0 ) || err ) {
125
125
var error = null
126
126
127
127
if ( err ) {
@@ -134,7 +134,7 @@ PDF.prototype.exec = function PdfExec (callback) {
134
134
135
135
// Append anything caught from the stderr
136
136
var postfix = stderr . length ? '\n' + Buffer . concat ( stderr ) . toString ( ) : ''
137
- if ( postfix ) err . message += postfix
137
+ if ( postfix ) error . message += postfix
138
138
139
139
return callback ( error )
140
140
}
You can’t perform that action at this time.
0 commit comments