mirror of
https://github.com/penpot/penpot.git
synced 2026-06-16 20:32:04 +00:00
When an organization invitation token is verified by a logged-out recipient (e.g. an unregistered invitee opening the emailed link), profile-id is nil. The team-invitation branch still evaluated get-org-membership eagerly, calling nitrate with that nil profile-id. That request fails and surfaces as a generic error, masking the clean :invalid-token response and dropping the user on the login screen instead of the dedicated "Invite invalid" page. Only query membership when a logged-in profile is present, so a canceled or otherwise invalid org invite reaches the :invalid-token path as intended.