Skip to content

fix ({}).constructor===Object #1047

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

Schniz
Copy link
Collaborator

@Schniz Schniz commented Nov 28, 2024

this resolves #899 with a caveat that an object that was created outside
of the VM will obviously won't satisfy this requirement. However, it will
still be instaceof Object which is interesting. I am not sure it'll be easy to solve.

@Schniz Schniz self-assigned this Nov 28, 2024
Copy link

changeset-bot bot commented Nov 28, 2024

⚠️ No Changeset found

Latest commit: 819fabf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link

vercel bot commented Nov 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
edge-runtime ⬜️ Skipped (Inspect) Apr 1, 2025 2:20pm

@@ -12,7 +12,7 @@ test('Error maintains a stack trace', async () => {
vm.evaluate(`(${fn})()`)

expect(log).toHaveBeenCalledTimes(1)
expect(log.mock.lastCall[0]).toMatch(/^Error: hello, world!\s+at fn/m)
expect(log.mock.lastCall[0]).toMatch(/^Error: hello, world!\s+at Object/m)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is my main concern 👀

Schniz added 3 commits April 1, 2025 16:20
this resolves #899 with a caveat that an object that was created outside
of the VM will obviously won't satisfy this requirement. However, it will
still be `instaceof Object` which is interesting. I am not sure it'll be easy to solve.
@Kikobeats Kikobeats force-pushed the schniz/fix-dot-constructor branch from aba27c0 to 819fabf Compare April 1, 2025 14:20
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.

new Object().constructor === Object returns false
1 participant