Skip to content

Commit edec1b8

Browse files
committed
fix 静态方法调用错误的问题
1 parent c8e1911 commit edec1b8

17 files changed

+41
-41
lines changed

dist/classic/iclient-classic-es6.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ module.exports = g;
237237
}
238238

239239
function Promise(fn) {
240-
if (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');
240+
if (!(this instanceof Promise)) throw new TypeError('Promises must be constructed via new');
241241
if (typeof fn !== 'function') throw new TypeError('not a function');
242242
this._state = 0;
243243
this._handled = false;
@@ -361,9 +361,9 @@ module.exports = g;
361361
};
362362

363363
Promise.all = function (arr) {
364-
var args = Array.prototype.slice.call(arr);
365-
366364
return new Promise(function (resolve, reject) {
365+
if (!arr || typeof arr.length === 'undefined') throw new TypeError('Promise.all accepts an array');
366+
var args = Array.prototype.slice.call(arr);
367367
if (args.length === 0) return resolve([]);
368368
var remaining = args.length;
369369

dist/classic/iclient-classic-es6.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/classic/iclient-classic.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11267,7 +11267,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1126711267
}
1126811268

1126911269
function Promise(fn) {
11270-
if (_typeof(this) !== 'object') throw new TypeError('Promises must be constructed via new');
11270+
if (!(this instanceof Promise)) throw new TypeError('Promises must be constructed via new');
1127111271
if (typeof fn !== 'function') throw new TypeError('not a function');
1127211272
this._state = 0;
1127311273
this._handled = false;
@@ -11391,9 +11391,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1139111391
};
1139211392

1139311393
Promise.all = function (arr) {
11394-
var args = Array.prototype.slice.call(arr);
11395-
1139611394
return new Promise(function (resolve, reject) {
11395+
if (!arr || typeof arr.length === 'undefined') throw new TypeError('Promise.all accepts an array');
11396+
var args = Array.prototype.slice.call(arr);
1139711397
if (args.length === 0) return resolve([]);
1139811398
var remaining = args.length;
1139911399

dist/classic/iclient-classic.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/leaflet/iclient9-leaflet-es6.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2223,7 +2223,7 @@ module.exports = function(){try{return elasticsearch}catch(e){return {}}}();
22232223
}
22242224

22252225
function Promise(fn) {
2226-
if (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');
2226+
if (!(this instanceof Promise)) throw new TypeError('Promises must be constructed via new');
22272227
if (typeof fn !== 'function') throw new TypeError('not a function');
22282228
this._state = 0;
22292229
this._handled = false;
@@ -2347,9 +2347,9 @@ module.exports = function(){try{return elasticsearch}catch(e){return {}}}();
23472347
};
23482348

23492349
Promise.all = function (arr) {
2350-
var args = Array.prototype.slice.call(arr);
2351-
23522350
return new Promise(function (resolve, reject) {
2351+
if (!arr || typeof arr.length === 'undefined') throw new TypeError('Promise.all accepts an array');
2352+
var args = Array.prototype.slice.call(arr);
23532353
if (args.length === 0) return resolve([]);
23542354
var remaining = args.length;
23552355

@@ -25780,9 +25780,9 @@ class ThemeUnique_ThemeUnique extends Theme_Theme {
2578025780
var len = uItems ? uItems.length : 0;
2578125781
Util.extend(res, obj);
2578225782
res.items = [];
25783-
res.defaultStyle = new ServerStyle_ServerStyle.fromJson(obj.defaultStyle);
25783+
res.defaultStyle = ServerStyle_ServerStyle.fromJson(obj.defaultStyle);
2578425784
for (var i = 0; i < len; i++) {
25785-
res.items.push(new ThemeUniqueItem_ThemeUniqueItem.fromObj(uItems[i]));
25785+
res.items.push(ThemeUniqueItem_ThemeUniqueItem.fromObj(uItems[i]));
2578625786
}
2578725787
return res;
2578825788
}

dist/leaflet/iclient9-leaflet-es6.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/leaflet/iclient9-leaflet.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27152,9 +27152,9 @@ var ThemeUnique = exports.ThemeUnique = function (_Theme) {
2715227152
var len = uItems ? uItems.length : 0;
2715327153
_Util.Util.extend(res, obj);
2715427154
res.items = [];
27155-
res.defaultStyle = new _ServerStyle.ServerStyle.fromJson(obj.defaultStyle);
27155+
res.defaultStyle = _ServerStyle.ServerStyle.fromJson(obj.defaultStyle);
2715627156
for (var i = 0; i < len; i++) {
27157-
res.items.push(new _ThemeUniqueItem.ThemeUniqueItem.fromObj(uItems[i]));
27157+
res.items.push(_ThemeUniqueItem.ThemeUniqueItem.fromObj(uItems[i]));
2715827158
}
2715927159
return res;
2716027160
}
@@ -74001,7 +74001,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
7400174001
/* 399 */
7400274002
/***/ (function(module) {
7400374003

74004-
module.exports = {"_from":"proj4@2.4.4","_id":"proj4@2.4.4","_inBundle":false,"_integrity":"sha512-yo6qTpBQXnxhcPopKJeVwwOBRzUpEa3vzSFlr38f5mF4Jnfb6NOL/ePIomefWiZmPgkUblHpcwnWVMB8FS3GKw==","_location":"/proj4","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"proj4@2.4.4","name":"proj4","escapedName":"proj4","rawSpec":"2.4.4","saveSpec":null,"fetchSpec":"2.4.4"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/proj4/-/proj4-2.4.4.tgz","_shasum":"c03d825e380f6850a4a7af5d20d365f6b72c4042","_spec":"proj4@2.4.4","_where":"F:\\dev\\iClient-JavaScript","author":"","bugs":{"url":"https://github.com/proj4js/proj4js/issues"},"bundleDependencies":false,"contributors":[{"name":"Mike Adair","email":"madair@dmsolutions.ca"},{"name":"Richard Greenwood","email":"rich@greenwoodmap.com"},{"name":"Calvin Metcalf","email":"calvin.metcalf@gmail.com"},{"name":"Richard Marsden","url":"http://www.winwaed.com"},{"name":"T. Mittan"},{"name":"D. Steinwand"},{"name":"S. Nelson"}],"dependencies":{"mgrs":"1.0.0","wkt-parser":"^1.2.0"},"deprecated":false,"description":"Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.","devDependencies":{"chai":"~1.8.1","curl":"git://github.com/cujojs/curl.git","grunt":"^1.0.1","grunt-cli":"~0.1.13","grunt-contrib-connect":"~0.6.0","grunt-contrib-jshint":"~1.1.0","grunt-contrib-uglify":"~0.11.1","grunt-mocha-phantomjs":"~0.4.0","grunt-rollup":"^1.0.1","istanbul":"~0.2.4","mocha":"~1.17.1","rollup":"^0.41.4","rollup-plugin-json":"^2.0.1","rollup-plugin-node-resolve":"^2.0.0","tin":"~0.4.0"},"directories":{"test":"test","doc":"docs"},"homepage":"https://github.com/proj4js/proj4js#readme","license":"MIT","main":"dist/proj4-src.js","module":"lib/index.js","name":"proj4","repository":{"type":"git","url":"git://github.com/proj4js/proj4js.git"},"scripts":{"build":"grunt","build:tmerc":"grunt build:tmerc","test":"npm run build && istanbul test _mocha test/test.js"},"version":"2.4.4"};
74004+
module.exports = {"_from":"proj4@2.4.4","_id":"proj4@2.4.4","_inBundle":false,"_integrity":"sha1-wD2CXjgPaFCkp69dINNl9rcsQEI=","_location":"/proj4","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"proj4@2.4.4","name":"proj4","escapedName":"proj4","rawSpec":"2.4.4","saveSpec":null,"fetchSpec":"2.4.4"},"_requiredBy":["/"],"_resolved":"http://registry.npm.taobao.org/proj4/download/proj4-2.4.4.tgz","_shasum":"c03d825e380f6850a4a7af5d20d365f6b72c4042","_spec":"proj4@2.4.4","_where":"E:\\2018\\git\\iClient-JavaScript","author":"","bugs":{"url":"https://github.com/proj4js/proj4js/issues"},"bundleDependencies":false,"contributors":[{"name":"Mike Adair","email":"madair@dmsolutions.ca"},{"name":"Richard Greenwood","email":"rich@greenwoodmap.com"},{"name":"Calvin Metcalf","email":"calvin.metcalf@gmail.com"},{"name":"Richard Marsden","url":"http://www.winwaed.com"},{"name":"T. Mittan"},{"name":"D. Steinwand"},{"name":"S. Nelson"}],"dependencies":{"mgrs":"1.0.0","wkt-parser":"^1.2.0"},"deprecated":false,"description":"Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.","devDependencies":{"chai":"~1.8.1","curl":"git://github.com/cujojs/curl.git","grunt":"^1.0.1","grunt-cli":"~0.1.13","grunt-contrib-connect":"~0.6.0","grunt-contrib-jshint":"~1.1.0","grunt-contrib-uglify":"~0.11.1","grunt-mocha-phantomjs":"~0.4.0","grunt-rollup":"^1.0.1","istanbul":"~0.2.4","mocha":"~1.17.1","rollup":"^0.41.4","rollup-plugin-json":"^2.0.1","rollup-plugin-node-resolve":"^2.0.0","tin":"~0.4.0"},"directories":{"test":"test","doc":"docs"},"homepage":"https://github.com/proj4js/proj4js#readme","license":"MIT","main":"dist/proj4-src.js","module":"lib/index.js","name":"proj4","repository":{"type":"git","url":"git://github.com/proj4js/proj4js.git"},"scripts":{"build":"grunt","build:tmerc":"grunt build:tmerc","test":"npm run build && istanbul test _mocha test/test.js"},"version":"2.4.4"};
7400574005

7400674006
/***/ }),
7400774007
/* 400 */
@@ -98708,7 +98708,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
9870898708
}
9870998709

9871098710
function Promise(fn) {
98711-
if (_typeof(this) !== 'object') throw new TypeError('Promises must be constructed via new');
98711+
if (!(this instanceof Promise)) throw new TypeError('Promises must be constructed via new');
9871298712
if (typeof fn !== 'function') throw new TypeError('not a function');
9871398713
this._state = 0;
9871498714
this._handled = false;
@@ -98832,9 +98832,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
9883298832
};
9883398833

9883498834
Promise.all = function (arr) {
98835-
var args = Array.prototype.slice.call(arr);
98836-
9883798835
return new Promise(function (resolve, reject) {
98836+
if (!arr || typeof arr.length === 'undefined') throw new TypeError('Promise.all accepts an array');
98837+
var args = Array.prototype.slice.call(arr);
9883898838
if (args.length === 0) return resolve([]);
9883998839
var remaining = args.length;
9884098840

dist/leaflet/iclient9-leaflet.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mapboxgl/iclient9-mapboxgl-es6.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ module.exports = function(){try{return elasticsearch}catch(e){return {}}}();
971971
}
972972

973973
function Promise(fn) {
974-
if (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');
974+
if (!(this instanceof Promise)) throw new TypeError('Promises must be constructed via new');
975975
if (typeof fn !== 'function') throw new TypeError('not a function');
976976
this._state = 0;
977977
this._handled = false;
@@ -1095,9 +1095,9 @@ module.exports = function(){try{return elasticsearch}catch(e){return {}}}();
10951095
};
10961096

10971097
Promise.all = function (arr) {
1098-
var args = Array.prototype.slice.call(arr);
1099-
11001098
return new Promise(function (resolve, reject) {
1099+
if (!arr || typeof arr.length === 'undefined') throw new TypeError('Promise.all accepts an array');
1100+
var args = Array.prototype.slice.call(arr);
11011101
if (args.length === 0) return resolve([]);
11021102
var remaining = args.length;
11031103

@@ -24509,9 +24509,9 @@ class ThemeUnique_ThemeUnique extends Theme_Theme {
2450924509
var len = uItems ? uItems.length : 0;
2451024510
Util_Util.extend(res, obj);
2451124511
res.items = [];
24512-
res.defaultStyle = new ServerStyle_ServerStyle.fromJson(obj.defaultStyle);
24512+
res.defaultStyle = ServerStyle_ServerStyle.fromJson(obj.defaultStyle);
2451324513
for (var i = 0; i < len; i++) {
24514-
res.items.push(new ThemeUniqueItem_ThemeUniqueItem.fromObj(uItems[i]));
24514+
res.items.push(ThemeUniqueItem_ThemeUniqueItem.fromObj(uItems[i]));
2451524515
}
2451624516
return res;
2451724517
}

dist/mapboxgl/iclient9-mapboxgl-es6.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)