don't use the store until it's ready to be used

This commit is contained in:
ansuz
2016-08-02 12:11:40 +02:00
parent fffa9acf15
commit 600f3151e9
6 changed files with 99 additions and 32 deletions

View File

@@ -65,5 +65,11 @@ define(function () {
cb(void 0, Object.keys(localStorage));
};
Store.ready = function (f) {
if (typeof(f) === 'function') {
f(void 0, Store);
}
};
return Store;
});