Skip to content

Commit

Permalink
tagName may not always exist
Browse files Browse the repository at this point in the history
  • Loading branch information
KonnorRogers committed Jun 24, 2024
1 parent 67bf11e commit 069eb04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pretty-format/src/plugins/DOMElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const testHasAttribute = (val: any) => {
};

const isCustomElement = (val: any) => {
const {tagName} = val;
const tagName = val?.tagName;
return (
(typeof tagName === 'string' && tagName.includes('-')) ||
testHasAttribute(val)
Expand Down

0 comments on commit 069eb04

Please sign in to comment.