Skip to content

Fix crash when session.todos is not an array#823

Open
chaehyun2 wants to merge 1 commit intoslopus:mainfrom
chaehyun2:fix/todos-array-check
Open

Fix crash when session.todos is not an array#823
chaehyun2 wants to merge 1 commit intoslopus:mainfrom
chaehyun2:fix/todos-array-check

Conversation

@chaehyun2
Copy link

Summary

  • Add Array.isArray guard in ActiveSessionsGroup.tsx to prevent .filter() crash on non-array todos
  • Add Array.isArray guard in reducer.ts to ensure todos output is always an array or undefined
  • Add HAPPY_SERVER_URL build arg to Dockerfile.webapp for custom server URL injection

Problem

When session.todos contains a non-array value, the app crashes with:

  • Web: t.todos.filter is not a function
  • Android: undefined is not a function

Test plan

  • Verified web UI no longer crashes with malformed todos data
  • Android app should also be fixed once this is included in a new build

🤖 Generated with Claude Code

Add Array.isArray guards to prevent "undefined is not a function"
errors when todos data is not in expected array format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant