Skip to content

Commit 9088676

Browse files
committedSep 15, 2012
fixed; callback scope
1 parent faabd43 commit 9088676

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎lib/command.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ module.exports = function (proto) {
188188
err = new Error("gm().stream() or gm().write() with a non-readable " +
189189
"stream. Pass \"{bufferStream: true}\" to identify() " +
190190
"or getter (size, format, etc...)");
191-
return cb(this, err);
191+
return cb(self, err);
192192
}
193193

194194
// handle streaming to gm errors when gm/imageMagick is not installed
@@ -198,7 +198,7 @@ module.exports = function (proto) {
198198
if ('EPIPE' == err.code && 'write' == err.syscall) {
199199
err.message = missingBinMsg(self) + err.message;
200200
}
201-
cb(this, err);
201+
cb(self, err);
202202
}
203203

204204
self.sourceStream.pipe(proc.stdin);
@@ -239,11 +239,11 @@ module.exports = function (proto) {
239239
err.code = code;
240240
err.signal = signal;
241241
};
242-
cb(this, err, stdout, stderr, cmd);
242+
cb(self, err, stdout, stderr, cmd);
243243
stdout = stderr = onOut = onErr = onExit = null;
244244
});
245245
} else {
246-
cb(this, null, proc.stdout, proc.stderr, cmd);
246+
cb(self, null, proc.stdout, proc.stderr, cmd);
247247
}
248248

249249
return this;

0 commit comments

Comments
 (0)
Please sign in to comment.