Skip to content

Commit

Permalink
fix: prevent duplicates (mainsail-crew#464)
Browse files Browse the repository at this point in the history
refactor: don't use regex

Signed-off-by: Dominik Willner <[email protected]>
  • Loading branch information
dw-0 committed Dec 25, 2021
1 parent 1744f3c commit b92a968
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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() : {}
Expand Down

0 comments on commit b92a968

Please sign in to comment.