Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
feat(error): ensure page is mounted before starting the timer
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed Oct 11, 2022
1 parent 95880d0 commit 309f6ed
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions renderer/_error.page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
</style>
<script lang="ts" setup>
import { inject } from "vue"
import { inject, onMounted } from "vue"
import type { PageContext } from "$/types/renderer"
Expand All @@ -125,9 +125,11 @@ const { userProfile } = pageProps
const hasDefaultPassword = userProfile !== null && !isUndefined(userProfile.meta.hasDefaultPassword)
if (hasDefaultPassword) {
setTimeout(() => {
assignPath("/")
}, convertTimeToMinutes("00:00:05"))
}
onMounted(() => {
if (hasDefaultPassword) {
setTimeout(() => {
assignPath("/")
}, convertTimeToMinutes("00:00:05"))
}
})
</script>

0 comments on commit 309f6ed

Please sign in to comment.