diff --git a/src/Tracks/index.tsx b/src/Tracks/index.tsx index 07edb1ffd..44f7c1d8b 100644 --- a/src/Tracks/index.tsx +++ b/src/Tracks/index.tsx @@ -47,7 +47,7 @@ const Tracks: React.FC = (props) => { // ========================== Render ========================== const tracksNode = - classNames.tracks || styles.tracks ? ( + trackList?.length && (classNames.tracks || styles.tracks) ? ( { const { asFragment } = render(); expect(asFragment().firstChild).toMatchSnapshot(); }); + + it('tipFormatter should not crash with undefined value', () => { + [undefined, null].forEach((value) => { + render(); + }); + }); });