Load settings earlier to avoid race condition

This commit is contained in:
Quantum 2025-06-15 19:56:40 -04:00
parent ab7e4d0138
commit 6b540a940e

View file

@ -62,6 +62,15 @@ $(() => {
return false
}
const settings = window.localStorage.getItem('settings')
if (settings) {
try {
loadSettings(JSON.parse(settings))
} catch (e) {
console.log(e)
}
}
if (window.crypto && window.crypto.getRandomValues) {
$('#too-old').hide()
@ -84,13 +93,4 @@ $(() => {
updateBitMeter()
generatePassword()
}
const settings = window.localStorage.getItem('settings')
if (settings) {
try {
loadSettings(JSON.parse(settings))
} catch (e) {
console.log(e)
}
}
})