pinojs / pino-pretty

🌲Basic prettifier for Pino log lines
MIT License
1.22k stars 147 forks source link

Fix Object.create(null) #507

Closed chrisands closed 4 months ago

chrisands commented 4 months ago

Closes #477

Problem fixed here https://github.com/planttheidea/fast-copy/issues/94

chrisands commented 4 months ago

@mcollina there is an issue #477 which caused pino-pretty crash when it tried to log object that was or contained nullish object with V8 optimization.

Optimized Object.create(null) that is used in fast-querystring

``` const Empty = function () {}; Empty.prototype = Object.create(null); ```

The issue was in fast-copy https://github.com/planttheidea/fast-copy/issues/94. After it was resolved I updated so pino-pretty wouldn't crash on such logs.