File tree Expand file tree Collapse file tree 10 files changed +1819
-381
lines changed
public/static/demo/config Expand file tree Collapse file tree 10 files changed +1819
-381
lines changed Original file line number Diff line number Diff line change @@ -239,12 +239,20 @@ class CommonServiceBase {
239239 withCredentials : options . withCredentials ,
240240 timeout : options . async ? 0 : null ,
241241 proxy : options . proxy
242- } ) . then ( function ( response ) {
242+ } )
243+ . then ( function ( response ) {
243244 if ( response . text ) {
244245 return response . text ( ) ;
245246 }
246247 return response . json ( ) ;
247- } ) . then ( function ( text ) {
248+ } )
249+ . catch ( function ( error ) {
250+ let result = { error : true , value : { } } ;
251+ var failure = ( options . scope ) ? bind ( options . failure , options . scope ) : options . failure ;
252+ failure ( result ) ;
253+ } )
254+ . then ( function ( text ) {
255+ if ( ! text ) return ;
248256 var result = null ;
249257 if ( typeof text === "string" && ( text . toLowerCase ( ) === 'true' || text . toLowerCase ( ) === 'false' ) ) {
250258 result = { } ;
Original file line number Diff line number Diff line change @@ -156,6 +156,8 @@ var FetchRequest = Zondy.FetchRequest = {
156156 timeout : RequestTimeout
157157 } ) . then ( function ( response ) {
158158 return response ;
159+ } ) . catch ( function ( error ) {
160+ return error ;
159161 } ) ;
160162 } ,
161163
Original file line number Diff line number Diff line change 99 "author" : " mapgis" ,
1010 "license" : " Apache2" ,
1111 "dependencies" : {
12+ "@turf/turf" : " ^6.3.0" ,
1213 "fast-xml-parser" : " ^3.17.6" ,
1314 "qs" : " ^6.9.4"
1415 }
You can’t perform that action at this time.
0 commit comments