Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tower1229 committed Jul 11, 2018
1 parent 84d0d1c commit 3fc4f7c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
1 change: 0 additions & 1 deletion sdk/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,6 @@ var apputil = (function(document, undefined) {
e(param);
}
});
delete appEventQueue[type];
}
}

Expand Down
18 changes: 7 additions & 11 deletions sdk/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,12 @@ define(function(require, exports, module) {
var got = 0,
resolved = function() {
got++;
if (got >= preGetList.length && typeof(callback) === 'function') {
callback();
if (got >= preGetList.length) {
got = null;
resolved = null;
if(typeof(callback) === 'function'){
callback();
}
}
},
checkPreget = function() {
Expand All @@ -206,7 +208,7 @@ define(function(require, exports, module) {
});
return hasResolved;
};
if (checkPreget()) {
if (typeof(callback) === 'function' && checkPreget()) {
return callback();
}
$.each(preGetList, function(i, e) {
Expand All @@ -215,14 +217,8 @@ define(function(require, exports, module) {
data: e.data,
success: function(res) {
resolved();
if (res.data) {
var data = res.data;
if (data) {
if (data.split) {
data = JSON.parse(data);
}
app.storage.val(e.key, data);
}
if (res) {
app.storage.val(e.key, res);
}
},
error: function() {}
Expand Down

0 comments on commit 3fc4f7c

Please sign in to comment.