Fix race condition with the iframe store
This commit is contained in:
parent
4aaaa2f647
commit
1e2cc6bea4
@ -696,6 +696,7 @@ define([
|
|||||||
f(void 0, env);
|
f(void 0, env);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var todo = function () {
|
||||||
storeToUse.ready(function (err, store) {
|
storeToUse.ready(function (err, store) {
|
||||||
common.store = env.store = store;
|
common.store = env.store = store;
|
||||||
if (USE_FS_STORE) {
|
if (USE_FS_STORE) {
|
||||||
@ -741,6 +742,13 @@ define([
|
|||||||
});
|
});
|
||||||
}, common);
|
}, common);
|
||||||
};
|
};
|
||||||
|
// If we use the fs store, make sure the localStorage or iframe store is ready
|
||||||
|
if (USE_FS_STORE) {
|
||||||
|
Store.ready(todo);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
todo();
|
||||||
|
};
|
||||||
|
|
||||||
var errorHandlers = [];
|
var errorHandlers = [];
|
||||||
common.onError = function (h) {
|
common.onError = function (h) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user