mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-28 10:33:02 -05:00
ForceReload: change web update logic from .reload() to .applyAppUpdate() (#6119)
This commit is contained in:
committed by
GitHub
parent
b142cf6cda
commit
914cc6503e
@@ -97,13 +97,10 @@ export function ForceReload() {
|
||||
setReloading(true);
|
||||
try {
|
||||
if (isElectron()) {
|
||||
// For Electron, use location.reload()
|
||||
window.location.reload();
|
||||
} else {
|
||||
// For browser, use Actual.reload() which unregisters service worker
|
||||
// and forces a fresh load
|
||||
if (window.Actual?.reload) {
|
||||
await window.Actual.reload();
|
||||
if (window.Actual?.applyAppUpdate) {
|
||||
await window.Actual.applyAppUpdate();
|
||||
} else {
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
6
upcoming-release-notes/6119.md
Normal file
6
upcoming-release-notes/6119.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Bugfix
|
||||
authors: [MatissJanis]
|
||||
---
|
||||
|
||||
ForceReload: change web update logic from .reload() to .applyAppUpdate()
|
||||
Reference in New Issue
Block a user