aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2017-10-17 15:34:27 +0200
committerTeryk Bellahsene <teryk@users.noreply.github.com>2017-10-19 12:12:11 +0200
commit74b3942db7a450d8334a6e1420a02c007eaa6fdb (patch)
tree654ebba1ceb387f1f0d7e6174d9c271cf01bd876 /server/sonar-web
parent2f214e97c7fc833ba08615e62aa6d7f8bf5911e0 (diff)
downloadsonarqube-74b3942db7a450d8334a6e1420a02c007eaa6fdb.tar.gz
sonarqube-74b3942db7a450d8334a6e1420a02c007eaa6fdb.zip
SONAR-9903 send empty scmAccount to reset the field
Diffstat (limited to 'server/sonar-web')
-rw-r--r--server/sonar-web/src/main/js/apps/users/form-view.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/users/form-view.js b/server/sonar-web/src/main/js/apps/users/form-view.js
index ade9b2070bc..ddde043085b 100644
--- a/server/sonar-web/src/main/js/apps/users/form-view.js
+++ b/server/sonar-web/src/main/js/apps/users/form-view.js
@@ -57,8 +57,10 @@ export default ModalForm.extend({
.map(function() {
return $(this).val();
})
- .toArray();
- return scmAccounts.filter(value => !!value);
+ .toArray()
+ .filter(value => !!value);
+ // return empty string to reset the field when updating
+ return scmAccounts.length ? scmAccounts : '';
},
addScmAccount() {