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);
|
||||
};
|
||||
|
||||
var todo = function () {
|
||||
storeToUse.ready(function (err, store) {
|
||||
common.store = env.store = store;
|
||||
if (USE_FS_STORE) {
|
||||
@ -741,6 +742,13 @@ define([
|
||||
});
|
||||
}, 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 = [];
|
||||
common.onError = function (h) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user