]> source.dussan.org Git - sonarqube.git/commitdiff
Fix problem with zero-sized component viewer
authorStas Vilchik <vilchiks@gmail.com>
Tue, 16 Dec 2014 16:47:19 +0000 (17:47 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 17 Dec 2014 08:23:27 +0000 (09:23 +0100)
server/sonar-web/src/main/coffee/component-viewer/main.coffee

index a35083017ff407d390794750e521cde14517897c..ab9241fcbed9ce94f2be38a41033d8660913a439 100644 (file)
@@ -133,6 +133,8 @@ define [
 
       width = @elementToFit.width()
       height = @elementToFit.height()
+      return if width == 0 || height == 0
+
       availableWidth = width - workspace.outerWidth(true) - 20
       availableHeight = height - @$(@headerRegion.$el).outerHeight(true)