gis-common 5.1.17 → 5.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -715,11 +715,11 @@ const AjaxUtil = {
715
715
  * }
716
716
  * );
717
717
  */
718
- get(url, options, cb) {
718
+ get(url, options = {}, cb) {
719
719
  if (Util.isFunction(options)) {
720
720
  const t = cb;
721
721
  cb = options;
722
- options = t;
722
+ options = t || {};
723
723
  }
724
724
  const client = this._getClient(cb);
725
725
  client.open("GET", url, true);
@@ -903,7 +903,7 @@ const AjaxUtil = {
903
903
  * }
904
904
  * );
905
905
  */
906
- getJSON(url, options, cb) {
906
+ getJSON(url, options = {}, cb) {
907
907
  if (Util.isFunction(options)) {
908
908
  const t = cb;
909
909
  cb = options;
@@ -915,7 +915,7 @@ const AjaxUtil = {
915
915
  cb(data, err);
916
916
  }
917
917
  };
918
- if (options && options["jsonp"]) {
918
+ if (options && options.jsonp) {
919
919
  return this.jsonp(url, callback);
920
920
  }
921
921
  return this.get(url, options, callback);