From 98acca0c0edbf8f53001a71a3a67f5679cc3c085 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 12 Jan 2021 13:09:47 +0100 Subject: [PATCH] Fix drive reconnect error --- www/common/outer/async-store.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 0d8546289..f11c55280 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -2773,12 +2773,14 @@ define([ }); }, 5000); - store.networkPromise.then(function () { - clearTimeout(to); - }, function (err) { - console.error(err); - clearTimeout(to); - }); + if (store.networkPromise && store.networkPromise.then) { + store.networkPromise.then(function () { + clearTimeout(to); + }, function (err) { + console.error(err); + clearTimeout(to); + }); + } if (!data.cache) { return; }