Skip to content

Commit e8db3a0

Browse files
committed
fix(Error.custom): allow non-string code
1 parent 0edbfbc commit e8db3a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

error/custom.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ exports = module.exports = function (message/*, code, ext*/) {
1414
}
1515
}
1616
if (ext != null) assign(err, ext);
17-
if (code != null) err.code = String(code);
17+
if (code != null) err.code = code;
1818
if (captureStackTrace) captureStackTrace(err, exports);
1919
return err;
2020
};

0 commit comments

Comments
 (0)