From e02b9939b82f0f4271427dd353c568158dce91f6 Mon Sep 17 00:00:00 2001 From: Forrest Voight Date: Fri, 19 Oct 2012 00:51:06 -0400 Subject: [PATCH 1/1] prevent requests for null period of graph data, which causes lots of spam on console --- web-static/graphs.html | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/web-static/graphs.html b/web-static/graphs.html index dc08915..de0bbf9 100644 --- a/web-static/graphs.html +++ b/web-static/graphs.html @@ -404,12 +404,13 @@ .attr('href', function(period){ return "?" + period }) .attr("style", function(d, i) { return (i == 0 ? "" : "margin-left:.4em;") + "color:blue;text-decoration:underline;cursor:pointer" }); period = window.location.search.substr(1); - if(period == "") { + if(period.length < 3) { window.location.search = "Day"; + } else { + d3.json('/web/currency_info', function(currency_info) { + change_period(period, currency_info); + }); } - d3.json('/web/currency_info', function(currency_info) { - change_period(period, currency_info); - }); -- 1.7.1