Skip to content

Commit b7d5bd3

Browse files
committed
fix: remove shouldLoad from useEffect dependency array to prevent re-initialization loop
1 parent 04429ad commit b7d5bd3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/web-roo-code/src/components/providers/google-analytics-provider.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ export function GoogleAnalyticsProvider({ children }: { children: React.ReactNod
3737
})
3838

3939
return unsubscribe
40-
}, [shouldLoad])
40+
// eslint-disable-next-line react-hooks/exhaustive-deps -- shouldLoad intentionally omitted to prevent re-initialization loop
41+
}, [])
4142

4243
const initializeConsentDefaults = () => {
4344
// Set up consent defaults before gtag loads (Consent Mode v2 requirement)

0 commit comments

Comments
 (0)