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
@@ -14,15 +14,20 @@ export async function fetchAllEpisodes() {
|
||||
}
|
||||
const controller = new AbortController()
|
||||
const timeout = setTimeout(() => controller.abort(), 8000)
|
||||
const response = await fetch(RSS_FEED_URL, { signal: controller.signal })
|
||||
clearTimeout(timeout)
|
||||
if (!response.ok) throw new Error(`RSS fetch failed: ${response.status}`)
|
||||
const xml = await response.text()
|
||||
rawXmlCache = xml
|
||||
const episodes = parseRssItems(xml)
|
||||
episodesCache = episodes
|
||||
episodesCacheAt = now
|
||||
return episodes
|
||||
try {
|
||||
const response = await fetch(RSS_FEED_URL, { signal: controller.signal })
|
||||
clearTimeout(timeout)
|
||||
if (!response.ok) throw new Error(`RSS fetch failed: ${response.status}`)
|
||||
const xml = await response.text()
|
||||
rawXmlCache = xml
|
||||
const episodes = parseRssItems(xml)
|
||||
episodesCache = episodes
|
||||
episodesCacheAt = now
|
||||
return episodes
|
||||
} catch (err) {
|
||||
clearTimeout(timeout)
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
||||
export async function fetchRawFeedXml() {
|
||||
|
||||
Reference in new issue
Block a user