Fix timeout issue on cacheready

pull/1/head
yflory 4 years ago
parent b8b2373512
commit 87a7669f29

@ -2765,15 +2765,15 @@ define([
store.networkPromise = info.networkPromise;
store.cacheReturned = returned;
// Check if we can connect
var to = setTimeout(function () {
store.networkTimeout = true;
broadcast([], "LOADING_DRIVE", {
type: "offline"
});
}, 5000);
if (store.networkPromise && store.networkPromise.then) {
// Check if we can connect
var to = setTimeout(function () {
store.networkTimeout = true;
broadcast([], "LOADING_DRIVE", {
type: "offline"
});
}, 5000);
store.networkPromise.then(function () {
clearTimeout(to);
}, function (err) {

Loading…
Cancel
Save