diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-03-21 10:29:11 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-03-21 14:18:29 +0100 |
commit | 8b618fcbddab0602203e5b79111c67ee263d6992 (patch) | |
tree | ebbdcd4b73083b70bf2517947068934aa91de492 /server/sonar-web/src | |
parent | d727787c5d3ce845954cfad76cc5a8009be26ef8 (diff) | |
download | sonarqube-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.js | 3 |
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 }; } |