Skip to content

Commit 59807dc

Browse files
author
Ravi Singh
committed
fix: stop full page reload on 401 — was causing iOS keyboard loop
The api.js 401 handler used window.location.href = '/login' which triggers a full page reload. On iOS, this manifests as the page reloading the instant the keyboard appears (any background SSE/fetch hitting 401 triggers it). Now just clears the token and throws, letting React Router handle the redirect without page reload.
1 parent baf9d3c commit 59807dc

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

pwa/client/src/utils/api.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// SPDX-License-Identifier: AGPL-3.0-or-later
2-
// Copyright (c) 2025-2026 Ravi Singh (Techposts)
3-
41
const BASE = '';
52

63
function getToken() {

0 commit comments

Comments
 (0)