Skip to content

Commit

Permalink
chore: check window for env
Browse files Browse the repository at this point in the history
  • Loading branch information
JBR90 committed Dec 17, 2024
1 parent 6028c38 commit 733a131
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/nextjs/src/hooks/useReactScan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ export const useReactScan = <T extends object>(
>(null);

useEffect(() => {
if (process.env.NEXT_PUBLIC_ENABLE_RENDER_SCAN === "true") {
if (
process.env.NEXT_PUBLIC_ENABLE_RENDER_SCAN === "true" ||
window.process.env.NEXT_PUBLIC_ENABLE_RENDER_SCAN === "true"
) {
try {
log.info("Initializing React Scan...");
scan({
Expand Down

0 comments on commit 733a131

Please sign in to comment.