diff --git a/src/util.js b/src/util.js index 89b2543c..c9ad6749 100644 --- a/src/util.js +++ b/src/util.js @@ -57,9 +57,10 @@ export function getJSON(url, params, callback) { callback(''); return; } - callback(JSON.parse(xmlHttp.response)); + callback(xmlHttp.response); }; xmlHttp.open('GET', url + getParamString(params), true); + xmlHttp.responseType = 'json'; xmlHttp.setRequestHeader('Accept', 'application/json'); xmlHttp.send(null); }