Skip to content

fix: guard against undefined text in recommendations causing toLowerC…#38

Merged
web3-jeff merged 1 commit intomainfrom
fix/issue-37
Apr 14, 2026
Merged

fix: guard against undefined text in recommendations causing toLowerC…#38
web3-jeff merged 1 commit intomainfrom
fix/issue-37

Conversation

@web3-jeff
Copy link
Copy Markdown
Collaborator

…ase crash (#37)

If a recommendation object is missing the text field (e.g. Claude only emitted a zh field or passed a malformed entry), r.text.toLowerCase() throws "Cannot read properties of undefined (reading 'toLowerCase')".

Filter recommendations to only include entries with a valid string text field before the dedup/merge loop.

Summary

Brief description of the changes.

Type

  • [✅ ] Bug fix
  • New feature / detection rule
  • Refactoring
  • Documentation

Testing

  • npm run build passes
  • npm test passes (32 tests)
  • Manually tested the change

Related Issues

Closes #37

…ase crash (#37)

If a recommendation object is missing the text field (e.g. Claude only
emitted a zh field or passed a malformed entry), r.text.toLowerCase()
throws "Cannot read properties of undefined (reading 'toLowerCase')".

Filter recommendations to only include entries with a valid string text
field before the dedup/merge loop.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@web3-jeff web3-jeff merged commit 5688ec0 into main Apr 14, 2026
3 checks passed
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.

workbuddy执行checkup时,checkup-report.js 脚本仍有 bug(Cannot read properties of undefined (reading 'toLowerCase'))

1 participant