Skip to content

Commit

Permalink
fix: fix issue with camel-case object names in temperature panel (#1491)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteyou committed Jul 28, 2023
1 parent 5c40820 commit aeee198
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,12 @@ export default class TemperaturePanelListItem extends Mixins(BaseMixin) {
}
get printerObjectSettings() {
if (!(this.objectName in (this.$store.state.printer?.configfile?.settings ?? {}))) return {}
// convert objectName to lowercase, because klipper only user lowercase in configfile.settings
const lowerCaseObjectName = this.objectName.toLowerCase()
return this.$store.state.printer?.configfile?.settings[this.objectName]
if (!(lowerCaseObjectName in (this.$store.state.printer?.configfile?.settings ?? {}))) return {}
return this.$store.state.printer?.configfile?.settings[lowerCaseObjectName]
}
get name() {
Expand Down

0 comments on commit aeee198

Please sign in to comment.