File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ export var RequestJSONPPromise = {
104104 send : function ( splitQuestUrl , callback , proxy ) {
105105 var len = splitQuestUrl . length ;
106106 if ( len > 0 ) {
107+ return new Promise ( ( resolve ) => {
107108 var jsonpUserID = new Date ( ) . getTime ( ) ;
108109 for ( var i = 0 ; i < len ; i ++ ) {
109110 var url = splitQuestUrl [ i ] ;
@@ -119,13 +120,14 @@ export var RequestJSONPPromise = {
119120 url = decodeURIComponent ( url ) ;
120121 url = proxy + encodeURIComponent ( url ) ;
121122 }
122- return fetchJsonp ( url , {
123+ fetchJsonp ( url , {
123124 jsonpCallbackFunction : callback ,
124125 timeout : 30000
125126 } ) . then ( ( result ) => {
126- return result . json ( ) ;
127+ resolve ( result . json ( ) ) ;
127128 } ) ;
128129 }
130+ } )
129131 }
130132 } ,
131133
You can’t perform that action at this time.
0 commit comments