summaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-03-21 10:29:11 +0100
committerStas Vilchik <vilchiks@gmail.com>2016-03-21 14:18:29 +0100
commit8b618fcbddab0602203e5b79111c67ee263d6992 (patch)
treeebbdcd4b73083b70bf2517947068934aa91de492 /server/sonar-web/src
parentd727787c5d3ce845954cfad76cc5a8009be26ef8 (diff)
downloadsonarqube-8b618fcbddab0602203e5b79111c67ee263d6992.tar.gz
sonarqube-8b618fcbddab0602203e5b79111c67ee263d6992.zip
fix adding first condition to quality gate
Diffstat (limited to 'server/sonar-web/src')
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/store/utils.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/store/utils.js b/server/sonar-web/src/main/js/apps/quality-gates/store/utils.js
index 81247f6393b..5927e84acbc 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/store/utils.js
+++ b/server/sonar-web/src/main/js/apps/quality-gates/store/utils.js
@@ -30,7 +30,8 @@ export function addCondition (qualityGate, metric) {
warning: '',
error: ''
};
- const conditions = [...qualityGate.conditions, condition];
+ const oldConditions = qualityGate.conditions || [];
+ const conditions = [...oldConditions, condition];
return { ...qualityGate, conditions };
}