fix: find LOAD & UNLOAD_FILAMENT macros case-insensitive (#1335)

This commit is contained in:
Stefan Dej 2023-04-08 10:03:05 +02:00 committed by GitHub
parent 6b68be1121
commit df83c9d8cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -362,11 +362,11 @@ export default class ExtruderControlPanel extends Mixins(BaseMixin, ControlMixin
}
get loadFilamentMacro() {
return this.macros.find((macro: PrinterStateMacro) => macro.name === 'LOAD_FILAMENT')
return this.macros.find((macro: PrinterStateMacro) => macro.name.toUpperCase() === 'LOAD_FILAMENT')
}
get unloadFilamentMacro() {
return this.macros.find((macro: PrinterStateMacro) => macro.name === 'UNLOAD_FILAMENT')
return this.macros.find((macro: PrinterStateMacro) => macro.name.toUpperCase() === 'UNLOAD_FILAMENT')
}
/**