Skip to content

Commit 40bd1c1

Browse files
committed
fix(firebase): fix window undefined
1 parent 8769120 commit 40bd1c1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

frontend/src/app/layout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ export default function RootLayout({
2828
children: React.ReactNode;
2929
}) {
3030
const app = initializeApp(firebaseConfig);
31-
const analytics = getAnalytics(app);
31+
if (typeof window !== "undefined") {
32+
const analytics = getAnalytics(app);
33+
}
3234
return (
3335
<html lang="en" data-theme="myTheme">
3436
<body className={montserrat.className}>

0 commit comments

Comments
 (0)