From 36ff573490532af8fda87fec1f8b6e554304103e Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 13 Apr 2015 17:38:25 +0200 Subject: [PATCH] fix quality flaws --- .../src/main/js/quality-profiles/restore-profile-view.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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(); -- 2.39.5