Skip to content

Commit dea71ef

Browse files
committed
getOperationNotAllowedMessageFromCounts: Better handle invalid counts
1 parent bc40a66 commit dea71ef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/components/src/internal/components/samples

packages/components/src/internal/components/samples/utils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export function getOperationNotAllowedMessageFromCounts(
176176
totalCount: number,
177177
notAllowedCount: number
178178
): string {
179-
if (totalCount === 0 || notAllowedCount === 0) return null;
179+
if (!totalCount || !notAllowedCount) return null;
180180

181181
if (notAllowedCount === totalCount) {
182182
return `All selected samples have a status that prevents ${operationRestrictionMessage[operation].all}.`;

0 commit comments

Comments
 (0)