]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2804 Fix bug when no branch to cover
authorDavid Gageot <david@gageot.net>
Mon, 15 Oct 2012 08:40:06 +0000 (10:40 +0200)
committerDavid Gageot <david@gageot.net>
Mon, 15 Oct 2012 08:40:06 +0000 (10:40 +0200)
sonar-server/src/main/webapp/WEB-INF/app/helpers/resource_helper.rb

index 03816ed9f083d04f21b8428935052607c9888b8e..592a7821e21e88a4fe7a658fe329a0099014dbc6 100644 (file)
@@ -26,7 +26,7 @@ module ResourceHelper
       value = format_variation(measure(key), :period => @period, :default => '-', :style => 'none')
     else
       key = prefix + measure_name
-      value = measure(key).formatted_value
+      value = measure(key) ? measure(key).formatted_value : '0'
     end
 
     if options[:span]