Skip to content

fix(ui): guard null labels in UpdateProjectInfoModal - #119

Closed
pancysingla-creator wants to merge 2 commits into
mainfrom
fix/project-info-null-labels
Closed

pancysingla-creator wants to merge 2 commits into
mainfrom
fix/project-info-null-labels

Conversation

@pancysingla-creator

Copy link
Copy Markdown
Contributor

What

Default labels to an empty list in UpdateProjectInfoModal before calling .map, for both the original project and the edited project.

Why

The Project Info page passes the raw project from ProjectsContext to the modal as originalProject. When a project has no labels, the API returns labels: null or leaves the field out. originalProject.labels.map(...) then throws TypeError: Cannot read properties of undefined (reading 'map'). The error boundary shows "Something Went Wrong", and no PUT /v1/projects/{id} is sent, so these projects cannot change stream or team from the console.

Testing

Manual, local stack (docker compose):

  1. Created a project via POST /v1/projects without labels. GET returns no labels field.
  2. Before: Project Info → Submit crashed with the TypeError above. No PUT was sent.
  3. After: Submit opens the confirm dialog, and both Labels tables show "No items found". Update sends PUT /v1/projects/{id} → 200 and shows "Project Info Updated!".

pancysingla-creator and others added 2 commits November 12, 2026 18:52
Projects whose labels are null (or omitted by the API) crashed the
Project Info confirm dialog on Submit with "Cannot read properties of
undefined (reading 'map')", so no PUT request was sent. Default both
the original and the edited labels to an empty list before mapping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bitnami removed its versioned images from Docker Hub, so
bitnami/postgresql:14.5.0 no longer resolves and `make it-test-api`
fails at `docker compose up -d postgres`. The same image is still
published under bitnamilegacy/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pancysingla-creator
pancysingla-creator deleted the fix/project-info-null-labels branch November 13, 2026 08:41
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