There was an error while loading. Please reload this page.
1 parent c5679c8 commit 9ca392bCopy full SHA for 9ca392b
1 file changed
src/lib/electricitymaps/index.ts
@@ -75,7 +75,7 @@ export const ElectricityMapsCarbonIntensity = (): PluginInterface => {
75
);
76
}
77
// This is the last hourly block, the ratio is the time between the start of the hour and the end.
78
- if (hour === hours - 1) {
+ if (hour === numHours - 1) {
79
return (
80
end.diff(start.add(hour, 'hour').startOf('hour'), 'second') / 3600
81
0 commit comments