Skip to content

Commit

Permalink
Fix test when running in the build
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp committed Sep 20, 2022
1 parent 42f5b24 commit 5823b6d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import { useState } from 'react';

export default function() {
let player = undefined;
// This is tested in dev mode, so make it work during the build to prevent
// breaking other tests.
if(import.meta.env.MODE === 'production') {
player = {};
}
const [] = useState(player.currentTime || null);

return (
Expand Down

0 comments on commit 5823b6d

Please sign in to comment.