4sp-dv 1.1.9 → 1.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1116,8 +1116,12 @@
1116
1116
 
1117
1117
  const docRef = doc(db, 'analytics', sessionId);
1118
1118
 
1119
+ // --- FIX: Determine userId before writing ---
1120
+ const currentUid = (auth.currentUser && auth.currentUser.uid) ? auth.currentUser.uid : 'anonymous';
1121
+
1119
1122
  // Using Firestore functions imported at top
1120
1123
  setDoc(docRef, {
1124
+ userId: currentUid, // <--- ADDED THIS FIELD
1121
1125
  sessionId: sessionId,
1122
1126
  userAgent: navigator.userAgent,
1123
1127
  lastActive: serverTimestamp(),
package/navigation.js CHANGED
@@ -603,8 +603,8 @@ let db;
603
603
  const container = document.getElementById('navbar-container');
604
604
  if (!container) return;
605
605
 
606
- const navElement = container.querySelector('nav');
607
- const tabWrapper = navElement.querySelector('.tab-wrapper');
606
+ // Fix for navigation.js:607 crash
607
+ const tabWrapper = container.querySelector('.tab-wrapper');
608
608
  const authControlsWrapper = document.getElementById('auth-controls-wrapper');
609
609
  const navbarLogo = document.getElementById('navbar-logo');
610
610
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "4sp-dv",
3
- "version": "1.1.9",
3
+ "version": "1.1.10",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/v5-4simpleproblems/v5-4simpleproblems-dv#readme",