]> 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>
Tue, 16 Dec 2014 16:47:19 +0000 (17:47 +0100)
server/sonar-web/src/main/coffee/component-viewer/main.coffee

index 5ba64c236a0f2014d5b9c8e7a1fc68e5f085db97..bcda3059a58fe748d4bfb09625cd5371e1e86a49 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)