RSSHub/lib
Dachein 85b5444d07
fix(route/apple/podcast): adapt to new serialized-server-data structure (#21387)
Apple Podcasts changed the `#serialized-server-data` element from a
direct array to an object wrapper `{ data: [...], userTokenHash }`.

This broke the route with:
  TypeError: Cannot read properties of undefined (reading 'data')

Changes:
- Handle both old (array) and new (object with `data` key) formats
  using `Array.isArray()` check for backward compatibility
- Add defensive optional chaining on the `channel` relationship
  access chain to prevent crashes when episodes lack channel data

Fixes the same underlying issue reported by yt-dlp (yt-dlp/yt-dlp#15926).

Made-with: Cursor

Co-authored-by: xbankeradmin <admin@xbanker.ai>
2026-03-16 19:58:24 +08:00
..
api feat(api): add cache probing (#21300) 2026-03-05 02:36:53 +08:00
assets
errors
middleware style: update oxlint to use simple-import-sort 2026-03-04 03:13:57 +08:00
routes fix(route/apple/podcast): adapt to new serialized-server-data structure (#21387) 2026-03-16 19:58:24 +08:00
routes-deprecated fix: quanta magazine (#21031) 2026-02-03 02:13:39 +08:00
shims style: migrate eslint to oxlint (#21224) 2026-02-28 21:23:11 +08:00
utils feat(api): add cache probing (#21300) 2026-03-05 02:36:53 +08:00
views
app-bootstrap.test.tsx
app-bootstrap.tsx
app.test.ts
app.ts
app.worker.tsx chore: replace postlight/parser with jocmp/mercury-parser (#21152) 2026-02-15 01:27:25 +08:00
config.remote-error.test.ts
config.test.ts
config.ts fix(route/theinitium): rewrite for Ghost CMS after site migration (#21071) 2026-03-09 04:13:25 +08:00
container.ts feat: add Cloudflare Containers deployment support (#20932) 2026-01-20 15:29:13 +08:00
entrypoints.test.ts
index.test.ts
index.ts
pkg.test.ts
pkg.ts
registry.dynamic.test.ts
registry.test.ts
registry.ts fix(lib/registry.ts): Allow hide debug info. (#20891) 2026-01-15 19:33:36 +08:00
route-paths.d.ts
router.js
routes.test.ts
server.ts
setup.test.ts style: migrate eslint to oxlint (#21224) 2026-02-28 21:23:11 +08:00
types.ts
worker.ts
worker.worker.test.ts