Skip to content

Commit 58f56b9

Browse files
committed
refactor(ProcessWorkflow): simplify type conversion in handleToggleChange
1 parent a694df2 commit 58f56b9

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/components/ProcessWorkflow.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,8 @@ function startCompute() {
7676
processStore.startProcess(id, props.algorithm);
7777
}
7878
79-
function handleToggleChange(value: number | string) {
80-
const numValue = typeof value === 'string' ? parseInt(value, 10) : value;
81-
const shouldShowOriginal = numValue === 0;
79+
function handleToggleChange(value: number) {
80+
const shouldShowOriginal = value === 0;
8281
if (shouldShowOriginal !== showingOriginal.value) {
8382
processStore.togglePreview();
8483
}

0 commit comments

Comments
 (0)