Skip to content

Commit

Permalink
fix issue with 30D/5min not loading
Browse files Browse the repository at this point in the history
  • Loading branch information
chienleng committed Sep 7, 2023
1 parent cc95a3d commit f22bc9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/Data.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import subDays from 'date-fns/subDays'
import subYears from 'date-fns/subYears'

import * as rangesJs from '~/constants/ranges.js'
import { INTERVAL_30MIN } from '~/constants/interval-filters.js'
import { INTERVAL_5MIN, INTERVAL_30MIN } from '~/constants/interval-filters.js'

function getYearPaths(prepend, regionId, oneYearAgo) {
const today = new Date()
Expand Down Expand Up @@ -41,7 +41,7 @@ export default {
break

case rangesJs.RANGE_30D:
if (interval === INTERVAL_30MIN) {
if (interval === INTERVAL_5MIN || interval === INTERVAL_30MIN) {
urls.push(`v3/stats/au${prepend}/${regionId}/power/30d.json`)
} else {
const thirtyDaysAgo = subDays(new Date(), 30)
Expand Down

0 comments on commit f22bc9b

Please sign in to comment.