]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5136 Protect against unavailability of parent activation info
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Wed, 11 Jun 2014 15:13:55 +0000 (17:13 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Wed, 11 Jun 2014 15:21:53 +0000 (17:21 +0200)
sonar-server/src/main/coffee/coding-rules/views/coding-rules-detail-quality-profile-view.coffee

index 7e856342f1be187b7b3a89a72aa836b831272a1b..c1f3c9a201ddd09e829a5002f27a464956032878 100644 (file)
@@ -71,7 +71,7 @@ define [
       return null unless @model.get('inherit') && @model.get('inherit') != 'NONE'
       parentKey = @model.get('parent') + ':' + @model.get('lang')
       parent = _.extend {}, _.findWhere(@options.app.qualityProfiles, key: parentKey)
-      parentActiveInfo = @model.collection.findWhere(qProfile: parentKey)
+      parentActiveInfo = @model.collection.findWhere(qProfile: parentKey) or {}
       _.extend parent, parentActiveInfo.toJSON()
       parent