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 wrapping of object with null prototype #2286

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

MrFoxPro
Copy link
Contributor

Summary

Could not add object with null prototype to store/mutable
https://playground.solidjs.com/anonymous/90e80787-1a13-41ff-82ea-90c0d1f20a80

Uncaught TypeError: Cannot convert undefined or null to object
    at Function.getOwnPropertyDescriptors (<anonymous>)

How did you test this change?

test("Object.create(null) is allowed", () => {
  const user = createMutable(Object.assign(Object.create(null), { name: "John" }));
  expect(user.name).toBe("John");
});

Copy link

changeset-bot bot commented Sep 15, 2024

🦋 Changeset detected

Latest commit: 18d3c81

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
solid-js Patch
test-integration Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@MrFoxPro MrFoxPro force-pushed the allow-null-prototype-in-mutable branch from a2be161 to 9c209d9 Compare September 15, 2024 22:50
@coveralls
Copy link

coveralls commented Sep 15, 2024

Pull Request Test Coverage Report for Build 10999665099

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 93.346%

Totals Coverage Status
Change from base Build 10692001464: 0.004%
Covered Lines: 4197
Relevant Lines: 4430

💛 - Coveralls

@ryansolid ryansolid merged commit 94929af into solidjs:main Sep 23, 2024
1 check 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.

3 participants