From 246231fd0e63d4f6748cbeb3ab7777359127cfc5 Mon Sep 17 00:00:00 2001 From: ostertun Date: Thu, 1 Oct 2020 23:35:49 +0200 Subject: [PATCH] RA-#8 Fix deleteCache --- client/scripts/mobileconsole.js | 1 + client/scripts/regatten.js.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/client/scripts/mobileconsole.js b/client/scripts/mobileconsole.js index 0bb689d..d6532e2 100644 --- a/client/scripts/mobileconsole.js +++ b/client/scripts/mobileconsole.js @@ -914,6 +914,7 @@ var mobileConsole = (function () { while (i--) { thisLine = lines[i].trim(); lineAndColumn = thisLine.match(/(?::)(\d+)(?::)(\d+)/); + if (lineAndColumn === null) continue; url = urlFromString(thisLine).replace(lineAndColumn[0], '').split('#')[0] || ''; caller = htmlToString(thisLine.replace(urlFromString(thisLine), '').replace(separator, '').replace('at ', '').trim()); if (caller === '' || caller === lineAndColumn[0]) { continue; } diff --git a/client/scripts/regatten.js.php b/client/scripts/regatten.js.php index 8aac478..9b5fd0e 100644 --- a/client/scripts/regatten.js.php +++ b/client/scripts/regatten.js.php @@ -238,7 +238,8 @@ function deleteCache() { return caches.delete(key); })); }); - toastInfo('The serviceWorker and the cache were deleted. A new serviceWorker will be generated on the next refresh.'); + toastInfo('Der serviceWorker und alle Caches wurden gelöscht. Die Seite lädt in wenigen Sekunden neu und erstellt damit neue Caches.', 10000); + setTimeout(function(){ location.reload(); }, 3000); } var pushesPossible = false;