aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-12-01 15:22:13 -0800
committerAdam Soltys <[email protected]>2023-12-01 15:22:13 -0800
commitacc51782323a3f8a3630aaa90908a69f417b4a60 (patch)
tree8105956fb8e9175b666a01f3f75ce9ecb2240737
parent9a1cbd040ead975d51f23f9546ba8d8bf9034207 (diff)
downloadcoinos-ui-acc51782323a3f8a3630aaa90908a69f417b4a60.tar.gz
coinos-ui-acc51782323a3f8a3630aaa90908a69f417b4a60.zip
fix locktime bug
-rw-r--r--src/routes/(app)/+layout.svelte8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte
index c6b11639..51ade9c7 100644
--- a/src/routes/(app)/+layout.svelte
+++ b/src/routes/(app)/+layout.svelte
@@ -41,9 +41,9 @@
});
if (browser) {
- let log = console.log;
checkSocket();
- expireTimer = setTimeout(expirePin, user.locktime * 1000 || 300000);
+ let locktime = user && user.locktime ? user.locktime : 300;
+ expireTimer = setTimeout(expirePin, locktime * 1000);
// if (window.NDEFReader) {
// try {
@@ -58,7 +58,7 @@
// goto(`/${user.username}/card/${serialNumber.replace(/:/g, '-')}`);
// });
// } catch (error) {
- // log('Argh! ' + error);
+ // console.log('Argh! ' + error);
// }
// }
}
@@ -90,7 +90,7 @@
onDestroy(() => {
if (browser) {
- close();
+ close();
clearTimeout(checkTimer);
clearTimeout(expireTimer);
}