From 87a7669f29c762593eab4431082b9066d72cde85 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 12 Jan 2021 14:10:51 +0100 Subject: [PATCH] Fix timeout issue on cacheready --- www/common/outer/async-store.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index f11c55280..1745d0dd7 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -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) {