Skip to content

Commit

Permalink
fix: fix when open in favorite mode
Browse files Browse the repository at this point in the history
  • Loading branch information
frodrigo committed Aug 29, 2023
1 parent c29dc21 commit 15170a1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/Home/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,13 @@ export default defineNuxtComponent({
},
beforeMount() {
const modeHash = getHashPart(this.$router, 'mode')
this.mode =
Mode[getHashPart(this.$router, 'mode') as keyof typeof Mode] ||
Mode.BROWSER
Mode[
Object.keys(Mode).find(
(key) => Mode[key as keyof typeof Mode] === modeHash
) as keyof typeof Mode
] || Mode.BROWSER
const favs = getHashPart(this.$router, 'favs')
if (favs) {
Expand Down

0 comments on commit 15170a1

Please sign in to comment.