From 16a2b3ddf4a8fd7cd0d4a2da4dbfe1b0d16ec716 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Lievremont Date: Wed, 11 Jun 2014 17:21:44 +0200 Subject: [PATCH] SONAR-5012 Protect against facets view unavailability --- .../coding-rules/views/coding-rules-facets-view.coffee | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sonar-server/src/main/coffee/coding-rules/views/coding-rules-facets-view.coffee b/sonar-server/src/main/coffee/coding-rules/views/coding-rules-facets-view.coffee index 1d66c2ee5a5..22204f2929a 100644 --- a/sonar-server/src/main/coffee/coding-rules/views/coding-rules-facets-view.coffee +++ b/sonar-server/src/main/coffee/coding-rules/views/coding-rules-facets-view.coffee @@ -41,8 +41,9 @@ define [ getQuery: -> q = {} - @ui.facets.each -> - property = jQuery(@).data 'property' - activeOptions = jQuery(@).find('.active').map(-> jQuery(@).data 'key').get() - q[property] = activeOptions.join ',' if activeOptions.length > 0 + if @ui.facets.each + @ui.facets.each -> + property = jQuery(@).data 'property' + activeOptions = jQuery(@).find('.active').map(-> jQuery(@).data 'key').get() + q[property] = activeOptions.join ',' if activeOptions.length > 0 q -- 2.39.5