fix: prevent duplicates (#464)
refactor: don't use regex Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
parent
648bbe581e
commit
36b8acdcd9
@ -69,7 +69,7 @@ export default class PressureAdvanceSettings extends Mixins(BaseMixin) {
|
||||
|
||||
get all_extruders(): string[] {
|
||||
Object.keys(this.$store.state.printer).forEach((e) => {
|
||||
(e.match(/^(extruder)\d*$/)) ? this.extruders.push(e) : {}
|
||||
if (e.startsWith('extruder') && !this.extruders.includes(e)) this.extruders.push(e)
|
||||
})
|
||||
this.extruders.length === 1 ? this.resetToActiveExtruder() : {}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user