File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ class Overpass {
116116 data_elements = jqXHR . responseXML . childNodes [ 0 ] . childElementCount ;
117117 } else if ( jqXHR . responseJSON ) {
118118 data_elements = (
119- jqXHR . responseJSON . elements || jqXHR . responseJSON . features
119+ jqXHR . responseJSON . elements || jqXHR . responseJSON . features || jqXHR . responseJSON . result
120120 ) . length ;
121121 }
122122 overpass . fire ( "onProgress" , `received about ${ data_txt } of data` ) ;
@@ -718,7 +718,7 @@ class Overpass {
718718 // switch only if there is some unplottable data in the returned json/xml.
719719 let empty_msg ;
720720 if (
721- ( data_mode == "json" && data . elements . length > 0 ) ||
721+ ( data_mode == "json" && data . elements && data . elements . length > 0 ) ||
722722 ( data_mode == "xml" &&
723723 $ ( "osm" , data ) . children ( ) . not ( "note,meta,bounds" )
724724 . length > 0 )
You can’t perform that action at this time.
0 commit comments