Skip to content

fix(expo): resolve packId type incompatibility in TripForm#2265

Merged
mikib0 merged 2 commits into
developmentfrom
copilot/fix-failing-job
Apr 21, 2026
Merged

fix(expo): resolve packId type incompatibility in TripForm#2265
mikib0 merged 2 commits into
developmentfrom
copilot/fix-failing-job

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 20, 2026

TypeScript compilation failed because packId in the form schema allows null but the Trip and TripInput types only accept string | undefined.

Changes

  • Convert null packId to undefined before passing to API functions in the submit handler
const submitData = {
  ...value,
  location: location ?? value.location,
  packId: value.packId ?? undefined,  // null → undefined
};

This maintains the form schema's ability to represent "no pack selected" as null while ensuring type compatibility with the API layer.

Copy link
Copy Markdown
Collaborator

@Isthisanmol Isthisanmol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
I should’ve considered doing this too.

@mikib0 mikib0 marked this pull request as ready for review April 21, 2026 13:02
@mikib0 mikib0 merged commit 6ae94cb into development Apr 21, 2026
6 checks passed
@mikib0 mikib0 deleted the copilot/fix-failing-job branch April 21, 2026 13:05
andrew-bierman pushed a commit that referenced this pull request May 14, 2026
fix(expo): resolve packId type incompatibility in TripForm
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.

3 participants