Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjastrzebski committed Nov 16, 2022
1 parent eeb35d1 commit 4138b62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/to-have-text-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function collectNormalizedText(element: ReactTestInstance) {

function collectChildrenText(element: ReactTestInstance | string): string[] {
if (typeof element === 'string') return [element];
if (!element || !element.children) return [];
if (!element?.children) return [];

const result: string[] = [];
element.children.forEach((child) => {
Expand Down

0 comments on commit 4138b62

Please sign in to comment.