MAPG-148 set xhr responseType after xhr open() because it is accepted by all browsers

This commit is contained in:
Bence Pőcze 2020-06-18 16:20:45 +02:00
parent efccb2dcc5
commit ce96e15911

View File

@ -2,11 +2,12 @@ var MapGuesser = {
httpRequest: function (method, url, callback, data) {
var xhr = new XMLHttpRequest();
xhr.responseType = 'json';
xhr.onload = callback;
xhr.open(method, url, true);
xhr.responseType = 'json';
if (method === 'POST') {
if (typeof data === 'undefined') {
data = new FormData();