Skip to content

Commit

Permalink
Complete isLoading on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
satkunas committed Apr 29, 2021
1 parent 8e20cc0 commit eb30505
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,15 @@ const setup = (props, context) => {
const isLoading = ref(true)
const isLocalUser = ref(false)
$store.dispatch('$_users/getUser', { pid: $store.state.session.username, quiet: true }).then(response => {
const { has_password } = response || {}
isLocalUser.value = !!has_password
isLoading.value = false
})
$store.dispatch('$_users/getUser', { pid: $store.state.session.username, quiet: true })
.then(response => {
const { has_password } = response || {}
isLocalUser.value = !!has_password
})
.finally(() => {
isLoading.value = false
})
const changePassword = () => {
isLoading.value = true
Expand Down

0 comments on commit eb30505

Please sign in to comment.