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(serialize): handling objects with null constructors #131

Merged
merged 3 commits into from
Mar 2, 2025

Conversation

zsilbi
Copy link
Contributor

@zsilbi zsilbi commented Mar 1, 2025

Fixes the following problem:

serialize(Object.create(null)); //TypeError: Cannot read properties of undefined (reading 'name')

Copy link

codecov bot commented Mar 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.42%. Comparing base (c5173ba) to head (1ac5319).
Report is 82 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #131       +/-   ##
===========================================
+ Coverage   80.31%   95.42%   +15.10%     
===========================================
  Files           8        8               
  Lines        1006      459      -547     
  Branches      111      116        +5     
===========================================
- Hits          808      438      -370     
+ Misses        198       19      -179     
- Partials        0        2        +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pi0 pi0 merged commit 249b52c into unjs:main Mar 2, 2025
4 checks passed
@zsilbi zsilbi deleted the fix/null-constructor branch March 3, 2025 09:54
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.

2 participants