Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: segment project fetch when global (#5311)
This fixes an edge case not caught originally in #5304 - When creating a new segment on the global level: - There is no `projectId`, either in the params or body - The `UPDATE_PROJECT_SEGMENT` is still a part of the permissions checked on the endpoint - There is no `id` on the params This made it so that we would run `segmentStore.get(id)` with an undefined `id`, causing issues. The fix was simply checking for the presence of `params.id` before proceeding.
- Loading branch information