Skip to content

Commit 25648b6

Browse files
Merge pull request #23 from hashexplaindata/fix/firebase-config-initialization-9349702922624603531
fix: add firebase-config.js for Web V9 Compat initialization
2 parents d8a2d0b + f3736a7 commit 25648b6

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

code/firebase-config.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Firebase V9 Compat Initialization
2+
// Strict Silent Client Mandate: Do not add console.log or error logging.
3+
4+
const firebaseConfig = {
5+
apiKey: "YOUR_API_KEY",
6+
authDomain: "YOUR_AUTH_DOMAIN",
7+
projectId: "YOUR_PROJECT_ID",
8+
storageBucket: "YOUR_STORAGE_BUCKET",
9+
messagingSenderId: "YOUR_MESSAGING_SENDER_ID",
10+
appId: "YOUR_APP_ID"
11+
};
12+
13+
// Defensive execution to prevent UI thread blocking if the CDN fails to load
14+
if (typeof firebase !== 'undefined') {
15+
try {
16+
firebase.initializeApp(firebaseConfig);
17+
} catch (e) {
18+
// Absolute silence mandated. No console.error here.
19+
// The failure will be naturally caught by experiment.js falling back to localStorage.
20+
}
21+
}

0 commit comments

Comments
 (0)