forked from 0x2620/oxjs
fix a bug related to clearing the requests cache
This commit is contained in:
parent
45ad8ee468
commit
7415b72037
3 changed files with 23 additions and 13 deletions
|
|
@ -119,8 +119,9 @@ Ox.Request = function(options) {
|
|||
options.age == -1
|
||||
|| options.age > +new Date() - cache[req].time
|
||||
)) {
|
||||
var data = cache[req].data;
|
||||
setTimeout(function() {
|
||||
callback && callback(cache[req].data);
|
||||
callback && callback(data);
|
||||
}, 0);
|
||||
} else {
|
||||
pending[options.id] = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue