From 9762cfbed615e37f429d200e5211b246e321772e Mon Sep 17 00:00:00 2001 From: Olivier Corradi Date: Sun, 24 Sep 2017 15:23:44 +0200 Subject: [PATCH] Properly shows arrows with null intensity --- web/app/exchangelayer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/exchangelayer.js b/web/app/exchangelayer.js index 07075de1d1..e660025df3 100644 --- a/web/app/exchangelayer.js +++ b/web/app/exchangelayer.js @@ -77,7 +77,7 @@ ExchangeLayer.prototype.render = function() { .select('img') .attr('src', function (d) { var intensity = Math.min(maxCarbonIntensity, Math.floor(d.co2intensity - d.co2intensity%arrowCarbonIntensitySliceSize)); - if(isNaN(intensity)) intensity = 'nan'; + if(d.co2intensity == null || isNaN(intensity)) intensity = 'nan'; return 'images/arrow-'+intensity+'-animated-'+that.exchangeAnimationDurationScale(Math.abs(d.netFlow || 0))+'.gif'; }); }