]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5136 Prevent synchronization issue between list and details
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Wed, 11 Jun 2014 13:02:14 +0000 (15:02 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Wed, 11 Jun 2014 13:02:14 +0000 (15:02 +0200)
sonar-server/src/main/coffee/coding-rules/views/coding-rules-detail-view.coffee

index f409374e87deebcc5422e09e23683e27ccb262d1..d516674bdc872494b29a6a211fa796fc4a40bb98 100644 (file)
@@ -117,9 +117,11 @@ define [
       jQuery.ajax
         url: "#{baseUrl}/api/rules/tags"
       .done (r) =>
-        that.ui.tagInput.select2
-          tags: _.difference (_.difference r.tags, @model.get 'tags'), @model.get 'sysTags'
-          width: '300px'
+        if @ui.tagInput.select2
+          # Prevent synchronization issue with navigation
+          @ui.tagInput.select2
+            tags: _.difference (_.difference r.tags, that.model.get 'tags'), that.model.get 'sysTags'
+            width: '300px'
 
       @ui.tagsEdit.hide()