We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8eaf529 commit 024ae21Copy full SHA for 024ae21
src/App.tsx
@@ -69,7 +69,15 @@ function App() {
69
}
70
71
const init = async () => {
72
- const vpnTimeUsedInMin = parseInt(localStorage.getItem("vpnTimeUsedInMin") || "0");
+ let vpnTimeUsedInMin = 0
73
+ try {
74
+ const ss = await localStorage.getItem("vpnTimeUsedInMin")
75
+ if (ss) {
76
+ vpnTimeUsedInMin = parseInt(ss)
77
+ }
78
+ } catch (ex) {
79
+
80
81
_vpnTimeUsedInMin.current = vpnTimeUsedInMin;
82
83
const queryParams = parseQueryParams(window.location.search);
0 commit comments