Skip to content

Commit a795bb5

Browse files
committed
空值检查 review by zhurch
1 parent 0ca1704 commit a795bb5

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/Core/iServer/ChartQueryService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ SuperMap.REST.ChartQueryService = SuperMap.Class(SuperMap.CoreServiceBase, {
6868
*/
6969
initialize: function (url, options) {
7070
SuperMap.CoreServiceBase.prototype.initialize.apply(this, arguments);
71+
options = options || {};
7172
if (options) {
7273
SuperMap.Util.extend(this, options);
7374
}
7475
var me = this, end;
75-
7676
if (!me.url) {
7777
return;
7878
}

src/Core/iServer/CoreServiceBase.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ SuperMap.CoreServiceBase = SuperMap.Class(SuperMap.ServiceBase, {
3737

3838
initialize: function (url, options) {
3939
SuperMap.ServiceBase.prototype.initialize.apply(this, arguments);
40+
options = options || {};
4041
if (options) {
4142
SuperMap.Util.extend(this, options);
4243
}

src/Core/iServer/GetFeaturesServiceBase.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ SuperMap.REST.GetFeaturesServiceBase = SuperMap.Class(SuperMap.CoreServiceBase,
7777
*/
7878
initialize: function (url, options) {
7979
SuperMap.CoreServiceBase.prototype.initialize.apply(this, arguments);
80+
options = options || {};
8081
if (options) {
8182
SuperMap.Util.extend(this, options);
8283
}

0 commit comments

Comments
 (0)