summaryrefslogtreecommitdiff
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-04 13:36:03 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-04 13:36:03 +0000
commit39b0e286bcf1239424eed8e0dac118a9f4f4b6ac (patch)
tree3cee07417e86b487913af6dd0d2084da31fa3f1c /app/assets/javascripts
parent9fc4650da6efa808960b28f9e77fede55424d77e (diff)
downloadgitlab-ce-39b0e286bcf1239424eed8e0dac118a9f4f4b6ac.tar.gz
Add latest changes from gitlab-org/gitlab@12-4-stable-ee
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/lib/utils/forms.js6
-rw-r--r--app/assets/javascripts/monitoring/utils.js2
2 files changed, 6 insertions, 2 deletions
diff --git a/app/assets/javascripts/lib/utils/forms.js b/app/assets/javascripts/lib/utils/forms.js
index 106209a2f3a..ced44ab9817 100644
--- a/app/assets/javascripts/lib/utils/forms.js
+++ b/app/assets/javascripts/lib/utils/forms.js
@@ -4,7 +4,11 @@ export const serializeFormEntries = entries =>
export const serializeForm = form => {
const fdata = new FormData(form);
const entries = Array.from(fdata.keys()).map(key => {
- const val = fdata.getAll(key);
+ let val = fdata.getAll(key);
+ // Microsoft Edge has a bug in FormData.getAll() that returns an undefined
+ // value for each form element that does not match the given key:
+ // https://github.com/jimmywarting/FormData/issues/80
+ val = val.filter(n => n);
return { name: key, value: val.length === 1 ? val[0] : val };
});
diff --git a/app/assets/javascripts/monitoring/utils.js b/app/assets/javascripts/monitoring/utils.js
index 4c72f5226b7..00f188c1d5a 100644
--- a/app/assets/javascripts/monitoring/utils.js
+++ b/app/assets/javascripts/monitoring/utils.js
@@ -41,7 +41,7 @@ export const isValidDate = dateString => {
return true;
}
return false;
- } catch {
+ } catch (e) {
return false;
}
};