Fix: Update-Reload navigiert zu '/' statt location.href — verhindert Tagebuch-Endloslade (SW by-v767)
This commit is contained in:
parent
b6eaaad47a
commit
68c38a2a0a
4 changed files with 6 additions and 6 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Router, State-Management, Navigation, Initialisierung.
|
||||
============================================================ */
|
||||
|
||||
const APP_VER = '766'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VER = '767'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VERSION = '1.5.0'; // ← semantische Version, wird bei make release gesetzt
|
||||
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
||||
|
||||
|
|
@ -1037,8 +1037,8 @@ const App = (() => {
|
|||
btn.textContent = 'Lädt…';
|
||||
btn.disabled = true;
|
||||
sessionStorage.setItem('by_update_reload', APP_VER);
|
||||
// Reload immer nach 800ms — NICHT auf SW-Operationen warten (können auf iOS hängen)
|
||||
setTimeout(() => location.replace(location.href), 800);
|
||||
// Immer zur Root — location.href enthält ggf. Hash der App in alten Zustand navigiert
|
||||
setTimeout(() => location.replace('/'), 800);
|
||||
try {
|
||||
const reg = await navigator.serviceWorker?.getRegistration();
|
||||
if (reg?.waiting) reg.waiting.postMessage({ type: 'SKIP_WAITING' });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue