Skip to content

Commit c11340b

Browse files
fixed issue #53
1 parent 43d2e36 commit c11340b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/helpers.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@ exports.prepareMetaData = function(meta) {
1717
makeObjectNonCircular(meta);
1818
cleanFieldNames(meta);
1919
}
20-
var prepared = common.clone(meta);
20+
var prepared = {};
2121
if (meta instanceof Error) {
2222
// This needed because Error's message, name and stack isn't
2323
// accessible through cycling properties and "common.clone" doesn't
2424
// copies them
2525
prepared.message = meta.message;
2626
prepared.name = meta.name;
2727
prepared.stack = meta.stack;
28+
} else {
29+
prepared = common.clone(meta);
2830
}
2931
return prepared;
3032
};

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "winston-mongodb",
33
"license": "MIT",
4-
"version": "1.1.1",
4+
"version": "1.1.2",
55
"description": "A MongoDB transport for winston",
66
"author": "Charlie Robbins <[email protected]>",
77
"contributors": [

0 commit comments

Comments
 (0)