From 5730ccc3c72477d0e5779347344e6e3cc43779f4 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Sat, 17 Jun 2017 17:12:07 +0100 Subject: [PATCH] default period fix --- src/Template/Main/blocks.ctp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Template/Main/blocks.ctp b/src/Template/Main/blocks.ctp index f73670a..9d64a78 100644 --- a/src/Template/Main/blocks.ctp +++ b/src/Template/Main/blocks.ctp @@ -140,7 +140,7 @@ var chartLoadInProgress = false; var minPeriod = 'hh'; var validPeriods = ['24h', '72h', '168h', '30d', '90d', '1y']; - var defaultPeriod = validPeriods.indexOf(localStorage.getItem('chartPeriod') > -1) ? localStorage.getItem('chartPeriod') : '24h'; + var defaultPeriod = (validPeriods.indexOf(localStorage.getItem('chartPeriod')) > -1) ? localStorage.getItem('chartPeriod') : '24h'; var periodGridCounts = {'24h': 24, '72h': 24, '168h': 14, '30d': 30, '90d': 45, '1y': 12 }; AmCharts.ready(function() { chart = AmCharts.makeChart('block-size-chart', {