Skip to content

Commit

Permalink
fix(Error.custom): allow non-string code
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Jun 5, 2017
1 parent 0edbfbc commit e8db3a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion error/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports = module.exports = function (message/*, code, ext*/) {
}
}
if (ext != null) assign(err, ext);
if (code != null) err.code = String(code);
if (code != null) err.code = code;
if (captureStackTrace) captureStackTrace(err, exports);
return err;
};

0 comments on commit e8db3a0

Please sign in to comment.