From: Stas Vilchik Date: Mon, 13 Apr 2015 15:38:25 +0000 (+0200) Subject: fix quality flaws X-Git-Tag: 5.2-RC1~2295 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=36ff573490532af8fda87fec1f8b6e554304103e;p=sonarqube.git fix quality flaws --- diff --git a/server/sonar-web/src/main/js/quality-profiles/restore-profile-view.js b/server/sonar-web/src/main/js/quality-profiles/restore-profile-view.js index 6cd06e01c4b..8a3f49ea62a 100644 --- a/server/sonar-web/src/main/js/quality-profiles/restore-profile-view.js +++ b/server/sonar-web/src/main/js/quality-profiles/restore-profile-view.js @@ -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();