From c11340b13ab1809f779a70d7836c070e29ce397d Mon Sep 17 00:00:00 2001 From: Yurij Mikhalevich <0@39.yt> Date: Mon, 3 Aug 2015 20:52:50 +0300 Subject: [PATCH] fixed issue #53 --- lib/helpers.js | 4 +++- package.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/helpers.js b/lib/helpers.js index 7f0d908..4e4cbc2 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -17,7 +17,7 @@ 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 @@ -25,6 +25,8 @@ exports.prepareMetaData = function(meta) { prepared.message = meta.message; prepared.name = meta.name; prepared.stack = meta.stack; + } else { + prepared = common.clone(meta); } return prepared; }; diff --git a/package.json b/package.json index 830c8f7..b36da44 100644 --- a/package.json +++ b/package.json @@ -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 ", "contributors": [