Skip to content

Commit

Permalink
Fix bnoguchiGH-59. Now, convertErr is called on proper Object literals.
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoguchi authored and bcherry committed Nov 10, 2011
1 parent 63c6b5c commit 1ee460a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/step.js
Expand Up @@ -93,8 +93,10 @@ Step.prototype = {
ret.errback = function (fn, scope) {
var oldFn = fn;
fn = function (err) {
if (! (err instanceof Error)) {
if (err.constructor === Object) {
err = convertErr(err);
} else if ('string' === typeof err) {
err = new Error(err);
}
return oldFn.call(this, err);
};
Expand Down

0 comments on commit 1ee460a

Please sign in to comment.