mhart / gelf-stream

A node.js stream to send JS objects to a Graylog2 server (in GELF format)
Other
29 stars 13 forks source link

Crash on hasOwnProperty in flatten with some objects #3

Closed interlock closed 10 years ago

interlock commented 10 years ago

It is possible to create an object that does not have hasOwnProperty

Example:

var data = Object.create(null);

Some other libraries will emit these kinds of objects, so we have to call hasOwnProperty through a call via Object.prototype to work with these objects.

PR incoming.