From f651df701f052f7836f29cd305a361bbee502653 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Thu, 28 Apr 2011 01:12:22 +0200 Subject: Allow working with the log record without a comment. Fixes #71 --- lib/logger.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/logger.js') diff --git a/lib/logger.js b/lib/logger.js index dce3bad..ce96f69 100644 --- a/lib/logger.js +++ b/lib/logger.js @@ -24,8 +24,8 @@ exports.initialize = function initialize(aMap) { }; exports.addLogRecord = function addLogRecord(rec) { - if (myStorage.storage.logs[rec.key]) { - myStorage.storage.logs[rec.key].comment += "
\n" + comment; + if (myStorage.storage.logs[rec.key] && myStorage.storage.logs[rec.key].comment) { + myStorage.storage.logs[rec.key].comment += "
\n" + rec.comment; } else { myStorage.storage.logs[rec.key] = rec; -- cgit