]> source.dussan.org Git - sonarqube.git/commitdiff
fix quality flaws
authorStas Vilchik <vilchiks@gmail.com>
Mon, 13 Apr 2015 15:38:25 +0000 (17:38 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 13 Apr 2015 15:38:25 +0000 (17:38 +0200)
server/sonar-web/src/main/js/quality-profiles/restore-profile-view.js

index 6cd06e01c4b1c8ea3f9448c4cce122386f72e7fe..8a3f49ea62ac0b70fd4c3d3a5a7eb53756c2f029 100644 (file)
@@ -32,11 +32,9 @@ define([
       var that = this;
       ModalFormView.prototype.onFormSubmit.apply(this, arguments);
       uploader({ form: $(e.currentTarget) }).done(function (r) {
-        if (typeof r === 'object') {
-          if (_.isArray(r.errors) || _.isArray(r.warning)) {
-            that.showErrors(r.errors, r.warnings);
-            return;
-          }
+        if (typeof r === 'object' && _.isArray(r.errors) || _.isArray(r.warning)) {
+          that.showErrors(r.errors, r.warnings);
+          return;
         }
         that.collection.fetch();
         that.close();