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>
|
||
|---|---|---|
| .. | ||
| api | ||
| assets | ||
| errors | ||
| middleware | ||
| routes | ||
| routes-deprecated | ||
| shims | ||
| utils | ||
| views | ||
| app-bootstrap.test.tsx | ||
| app-bootstrap.tsx | ||
| app.test.ts | ||
| app.ts | ||
| app.worker.tsx | ||
| config.remote-error.test.ts | ||
| config.test.ts | ||
| config.ts | ||
| container.ts | ||
| entrypoints.test.ts | ||
| index.test.ts | ||
| index.ts | ||
| pkg.test.ts | ||
| pkg.ts | ||
| registry.dynamic.test.ts | ||
| registry.test.ts | ||
| registry.ts | ||
| route-paths.d.ts | ||
| router.js | ||
| routes.test.ts | ||
| server.ts | ||
| setup.test.ts | ||
| types.ts | ||
| worker.ts | ||
| worker.worker.test.ts | ||