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: Account for object's prototype possibly being null #6925

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

boblauer
Copy link
Contributor

It's possible for Object.getPrototypeOf to return null (when the object is created via Object.create(null)), in which case null.constructor.name will throw.

If there is no prototype, this falls back to null prototype.

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Hi, thanks for opening this PR and for adding a test! LGTM

@Lms24 Lms24 merged commit 6d1a7cc into getsentry:master Jan 30, 2023
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.

None yet

3 participants