Skip to content

fix: Account for object's prototype possibly being null - #6925

Merged
Lms24 merged 1 commit into
getsentry:masterfrom
boblauer:fix-normalize-null-prototype
Jan 30, 2023
Merged

Lms24 merged 1 commit into
getsentry:masterfrom
boblauer:fix-normalize-null-prototype

Conversation

@boblauer

Copy link
Copy Markdown

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.

@Lms24 Lms24 left a comment

Copy link
Copy Markdown
Member

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.

3 participants