Fix missing setInitialized (#815)

Payment methods were not marked as initialized if the local storage item did not exist on page load.
This commit is contained in:
ekzyis 2024-02-13 21:30:54 +01:00 committed by GitHub
parent ec4e1b5da7
commit d6465162bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -99,6 +99,7 @@ export function LNbitsProvider ({ children }) {
const configStr = window.localStorage.getItem(storageKey)
if (!configStr) {
setEnabled(undefined)
setInitialized(true)
return
}

View File

@ -21,6 +21,7 @@ export function NWCProvider ({ children }) {
const configStr = window.localStorage.getItem(storageKey)
if (!configStr) {
setEnabled(undefined)
setInitialized(true)
return
}