Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Object.create(null) #507

Merged
merged 2 commits into from Apr 27, 2024
Merged

Fix Object.create(null) #507

merged 2 commits into from Apr 27, 2024

Conversation

chrisands
Copy link
Contributor

@chrisands chrisands commented Apr 24, 2024

Closes #477

Problem fixed here planttheidea/fast-copy#94

  • Add test for Object.create(null)
  • Update fast-copy

@chrisands chrisands marked this pull request as ready for review April 24, 2024 18:57
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

why the update of fast-copy?

@chrisands
Copy link
Contributor Author

chrisands commented Apr 24, 2024

@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 planttheidea/fast-copy#94. After it was resolved I updated so pino-pretty wouldn't crash on such logs.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit a80d977 into pinojs:master Apr 27, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Function.prototype.toString requires that 'this' be a Function
2 participants