Skip to content

fix: add type guards for non-name fields in analyseImport#172

Open
JuliaKalder wants to merge 1 commit into
mainfrom
fix/issue-162
Open

fix: add type guards for non-name fields in analyseImport#172
JuliaKalder wants to merge 1 commit into
mainfrom
fix/issue-162

Conversation

@JuliaKalder
Copy link
Copy Markdown
Owner

Summary

  • Adds type guards in analyseImport() for non-name fields (body, subject, to, cc, bcc, identities, attachments)
  • Templates with wrong-typed fields are now counted as invalid and skipped rather than forwarded to the compose API with incorrect types

Changes

  • modules/validation.js: Added 7 type guard checks before valid.push(t) in the analyseImport() loop

Test plan

  • All 96 existing tests pass (npm test)
  • The analyseImport test suite (6 tests) continues to pass

Fixes #162

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.

[LOW] analyseImport does not type-check non-name fields — wrong types stored and forwarded to compose API

1 participant