Skip to content

Commit eafe01d

Browse files
committed
fix: Delete some bloated code.
1 parent 780706c commit eafe01d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/components/common/PeripheralsDialog.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,7 @@ export default class ManualProbeDialog extends Mixins(StateMixin) {
368368
type: 'can',
369369
count: this.canbusUuids
370370
? Object.values(this.canbusUuids)
371-
.filter(value => Array.isArray(value))
372-
.reduce((a, b) => a + (b ? b.length : 0), 0)
371+
.reduce((a, b) => a + b.length, 0)
373372
: undefined
374373
})
375374
}
@@ -415,9 +414,9 @@ export default class ManualProbeDialog extends Mixins(StateMixin) {
415414
break
416415
417416
case 'can':
418-
this.canbusInterfaces.forEach((canbusInterface) => {
417+
for (const canbusInterface of this.canbusInterfaces) {
419418
SocketActions.machinePeripheralsCanbus(canbusInterface)
420-
})
419+
}
421420
break
422421
}
423422
}

0 commit comments

Comments
 (0)