Skip to content

Commit 73adcd3

Browse files
authored
Merge pull request #257 from codesandbox/draft/little-wind
fix: no cookie consent when loading the docs in an iframe
2 parents c843054 + 1f1c871 commit 73adcd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/projects-docs/utils/useInitAnalytics.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const useInitAnalytics = (amplitudeApiKey) => {
3131
};
3232

3333
useEffect(() => {
34-
if (process.env.NODE_ENV !== "production") {
34+
if (process.env.NODE_ENV !== "production" || window.self !== window.top) {
3535
return;
3636
}
3737

0 commit comments

Comments
 (0)