Skip to content

Commit

Permalink
fixed issue #53
Browse files Browse the repository at this point in the history
  • Loading branch information
yurijmikhalevich committed Aug 3, 2015
1 parent 43d2e36 commit c11340b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ exports.prepareMetaData = function(meta) {
makeObjectNonCircular(meta);
cleanFieldNames(meta);
}
var prepared = common.clone(meta);
var prepared = {};
if (meta instanceof Error) {
// This needed because Error's message, name and stack isn't
// accessible through cycling properties and "common.clone" doesn't
// copies them
prepared.message = meta.message;
prepared.name = meta.name;
prepared.stack = meta.stack;
} else {
prepared = common.clone(meta);
}
return prepared;
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "winston-mongodb",
"license": "MIT",
"version": "1.1.1",
"version": "1.1.2",
"description": "A MongoDB transport for winston",
"author": "Charlie Robbins <[email protected]>",
"contributors": [
Expand Down

0 comments on commit c11340b

Please sign in to comment.