Skip to content

Commit 784aaf9

Browse files
committed
Revert "fix: prevent NaN in stage output (#1139)"
This reverts commit e426bf5.
1 parent eb014af commit 784aaf9

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/utils/deployStages.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ function round(value: number, precision: number): number {
3232
}
3333

3434
function formatProgress(current: number, total: number): string {
35-
if (total === 0) {
36-
return '0/0 (0%)';
37-
}
38-
3935
return `${current}/${total} (${round((current / total) * 100, 0)}%)`;
4036
}
4137

@@ -103,12 +99,11 @@ export class DeployStages {
10399
{
104100
label: 'Members',
105101
get: (data): string | undefined =>
106-
data?.sourceMemberPolling?.original
107-
? formatProgress(
108-
data.sourceMemberPolling.original - data.sourceMemberPolling.remaining,
109-
data.sourceMemberPolling.original
110-
)
111-
: undefined,
102+
data?.sourceMemberPolling &&
103+
formatProgress(
104+
data.sourceMemberPolling.original - data.sourceMemberPolling.remaining,
105+
data.sourceMemberPolling.original
106+
),
112107
stage: 'Updating Source Tracking',
113108
type: 'dynamic-key-value',
114109
},

0 commit comments

Comments
 (0)