Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pcattori committed Jan 31, 2024
1 parent deb7f45 commit 6202840
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/remix-react/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ export const LiveReload =
nonce?: string;
}) {
// @ts-expect-error
let isViteClient = import.meta.env !== undefined;
let isViteClient = import.meta && import.meta.env !== undefined;
if (isViteClient) {
console.warn(
[
Expand All @@ -1094,9 +1094,9 @@ export const LiveReload =
"Then refresh the page to remove lingering scripts from `<LiveReload />`.",
].join("\n")
);
return null;
}
// @ts-expect-error
origin ??= import.meta.env ? "" : process.env.REMIX_DEV_ORIGIN;
origin ??= process.env.REMIX_DEV_ORIGIN;
let js = String.raw;
return (
<script
Expand Down

0 comments on commit 6202840

Please sign in to comment.