Fix 5 bugs: analytics range keys, stale visitor rows, NuggetsPage init state, episodes timer leak, unsanitized nuggets object; v2.0.1
Publish Container / docker (push) Successful in 14m54s
Publish Container / docker (push) Successful in 14m54s
- analytics: union byDayReal+byDayBot keys so bot-only days aren't dropped from range totals - analytics: exclude timestamp-less visitor rows from range filters (was unconditionally including them) - App.tsx: init `configured` to false so a network failure doesn't show a misleading "no episodes" state; add r.ok guard before r.json() - episodes.js: wrap fetch in try/catch so clearTimeout is called on network failure, matching the nuggets.js pattern - helpers.js: add sanitizeNuggets + wire it into sanitizeSiteContent so corrupted hosts/urls can't crash NuggetsPage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
31e79ad542
commit
4378fad66f
5 files changed
+50
-14
No files matched your search
+2
-2
@@ -1885,11 +1885,11 @@ function NuggetsPage({ content }: { content: SiteContent }) {
|
||||
|
||||
const [episodes, setEpisodes] = useState<NuggetsEpisode[]>([])
|
||||
const [loading, setLoading] = useState(true)
|
||||
const [configured, setConfigured] = useState(true)
|
||||
const [configured, setConfigured] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
fetch('/api/nuggets/episodes/all')
|
||||
.then(r => r.json())
|
||||
.then(r => r.ok ? r.json() : Promise.reject(r.status))
|
||||
.then((d: { episodes?: NuggetsEpisode[]; configured?: boolean }) => {
|
||||
setEpisodes(Array.isArray(d.episodes) ? d.episodes : [])
|
||||
setConfigured(d.configured !== false)
|
||||
|
||||
Reference in new issue
Block a user