litixsoft/log4js-node-mongodb — pull request #1 by maxnachlinger (2013-12-18 21:37:48+00:00)
Title: Trivial change to safely check for a string log message.

typeof ``loggingEvent.data[0] === 'string'`` will fail if loggingEvent.data[0] was created via ``new String("some logging here");`` My evidence:

```node
> var s = "this is a string"; typeof s;
'string'
> var s = new String('this is a string'); typeof s;
'object'
> var s = "this is a string"; Object.prototype.toString.call(s) === '[object String]';
true
> var s = new String('this is a string'); Object.prototype.toString.call(s) === '[object String]';
true
```
Yes, this is truly a trivial change :) At any rate, here's my fix.