Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 0 desired routing count in endpoint edit page (#2768)
**Changes:** This PR modifies the `ServiceLauncherPageContent` component to use the nullish coalescing operator (`??`) instead of the logical OR operator (`||`) when setting the `desiredRoutingCount` value. This ensures that a value of `0` for `endpoint?.desired_session_count` is respected rather than defaulting to `1`. **Rationale:** The previous implementation using `||` would treat `0` as a falsy value, causing it to default to `1`. By using `??`, we now correctly handle cases where `desired_session_count` is explicitly set to `0`, while still defaulting to `1` when the value is `null` or `undefined`. **Impact:** This change allows users to set a `desired_session_count` of `0` for endpoints, which may be necessary for certain service configurations or management scenarios.
- Loading branch information