From 3f3bdeced1e2e1f35b9f8e37a45f46233ee5cb58 Mon Sep 17 00:00:00 2001 From: Timothy Andrew Date: Mon, 19 Sep 2016 15:12:01 +0530 Subject: [PATCH] Do _not_ set `stats` to `null` when data is not available. - For cycle analytics. - Instead, make each individual `value` `null`, since the titles and descriptions are used by the frontend even when there is no data. --- app/helpers/cycle_analytics_helper.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/helpers/cycle_analytics_helper.rb b/app/helpers/cycle_analytics_helper.rb index d397b02a3aa..c0d1eb56fd3 100644 --- a/app/helpers/cycle_analytics_helper.rb +++ b/app/helpers/cycle_analytics_helper.rb @@ -21,8 +21,6 @@ module CycleAnalyticsHelper stats end - stats = nil if stats.all? { |stat| stat[:value].nil? } - summary = [ { title: "New Issues", value: cycle_analytics.summary.new_issues }, { title: "Commits", value: cycle_analytics.summary.commits }, -- GitLab