javascript: Don't resubmit when refreshing the page

This was not caught earlier because the problem was masked by turbolinks usage.

Tests:

- Install an app and see the page refreshing.
- Run manual update and see the page refreshing.
- Update Tor configuration and see the page refreshing.
- Run diagnostics from the diagnostics module and see the page refreshing.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2019-08-26 17:56:18 -04:00
1 parent 68bc333842
commit ea037aa944
1 file changed
+2 -1
+2 -1
View File
@@ -28,7 +28,8 @@ function sleep(ms) {
// Refresh the page once in n seconds
async function refresh(ms) {
await sleep(3000);
window.location.reload();
// Refresh the page without resubmitting the POST data.
window.location = window.location.href;
}
refresh();