Planner UI: fix first slot hover (#20993)

This commit is contained in:
Michael Geers 2025-05-02 10:57:05 +02:00 • committed by GitHub
parent 5586fad643
commit 163dd88351
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 4 deletions

View file

@ -111,7 +111,7 @@ export default defineComponent({
: this.fmtPricePerKWh(value, this.currency);
},
activeSlot(): Slot | null {
return this.activeIndex ? this.slots[this.activeIndex] : null;
return this.activeIndex !== null ? this.slots[this.activeIndex] : null;
},
activeSlotName(): string | null {
if (this.activeSlot) {

View file

@ -116,9 +116,6 @@ export default {
});
return sum / count;
},
activeSlot() {
return this.activeIndex !== null ? this.slots[this.activeIndex] : null;
},
},
methods: {
hoverSlot(index: number | null) {