Fix approvals request throwing 400 in IE 11
What does this MR do?
Fix approvals in MR widget in IE 11
Are there points in the code the reviewer needs to double check?
Using a POST
/DELETE
with vue-resource
will pass an undefined
body to the XHR method. In Chrome, it seems to ignore it and not send it through. In IE 11, it seem to send it through as a body and if Rails is parsing JSON, it throws a parsing error.
This pitfall applies everywhere but because we only have some many things written in Vue, and only so many things that send a POST
/DELETE
without a body
, and only so many people using IE, we seem to have only had this one bug reported.
This is a temporary hotfix for an issue users are running into. Here is a general discussion on how we can fix this across the code-base, https://gitlab.com/gitlab-org/gitlab-ce/issues/34534
Why was this MR needed?
Unable to approve/un-approve merge requests in IE 11
Does this MR meet the acceptance criteria?
- Tests
-
Added for this feature/bug - Would need a testing environment in IE
-
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #1874 (closed)