summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Pisek <dpisek@gitlab.com>2019-07-05 14:54:43 +1000
committerDave Pisek <dpisek@gitlab.com>2019-07-05 14:54:43 +1000
commit2976678a971de52d8684cca14afda0cdc60ff995 (patch)
tree3119bd100a20037943a3958d32c5dfa3b5d33d91
parent9414a41f8390511005702ab4fec99239b6c3c6dd (diff)
downloadgitlab-ce-63777-resolve-discussion-button-not-working-in-ie11.tar.gz
Resolve http issue with resolving notes in IE1163777-resolve-discussion-button-not-working-in-ie11
When calling `Vue.http.post` without passing in a data argument IE<edge will send `undefined` as the request-body. This will cause an issue for the API. Setting data to `null` prevents this from happening.
-rw-r--r--app/assets/javascripts/notes/services/notes_service.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/notes/services/notes_service.js b/app/assets/javascripts/notes/services/notes_service.js
index 237e70c0a4c..1434d016302 100644
--- a/app/assets/javascripts/notes/services/notes_service.js
+++ b/app/assets/javascripts/notes/services/notes_service.js
@@ -25,8 +25,10 @@ export default {
toggleResolveNote(endpoint, isResolved) {
const { RESOLVE_NOTE_METHOD_NAME, UNRESOLVE_NOTE_METHOD_NAME } = constants;
const method = isResolved ? UNRESOLVE_NOTE_METHOD_NAME : RESOLVE_NOTE_METHOD_NAME;
+ // need to set this to null or ie < edge will send 'undefined' as a string
+ const data = null;
- return Vue.http[method](endpoint);
+ return Vue.http[method](endpoint, data);
},
poll(data = {}) {
const endpoint = data.notesData.notesPath;