We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 042fb67 commit 4060c77Copy full SHA for 4060c77
1 file changed
src/common/util/FetchRequest.js
@@ -104,6 +104,7 @@ export var RequestJSONPPromise = {
104
send: function (splitQuestUrl, callback, proxy) {
105
var len = splitQuestUrl.length;
106
if (len > 0) {
107
+ return new Promise((resolve) => {
108
var jsonpUserID = new Date().getTime();
109
for (var i = 0; i < len; i++) {
110
var url = splitQuestUrl[i];
@@ -119,13 +120,14 @@ export var RequestJSONPPromise = {
119
120
url = decodeURIComponent(url);
121
url = proxy + encodeURIComponent(url);
122
}
- return fetchJsonp(url, {
123
+ fetchJsonp(url, {
124
jsonpCallbackFunction: callback,
125
timeout: 30000
126
}).then((result) => {
- return result.json();
127
+ resolve(result.json());
128
});
129
130
+ })
131
132
},
133
0 commit comments