Skip to content

Commit

Permalink
Merge pull request #110 from SpeciesFileGroup/development
Browse files Browse the repository at this point in the history
Clear store after leave taxa page
  • Loading branch information
José Luis Pereira authored and GitHub committed Aug 1, 2023
2 parents 95fa215 + 0dd7fd2 commit 5200b96
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/modules/otus/views/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,14 @@
</template>

<script setup>
import { ref, watch, onServerPrefetch, computed, onMounted } from 'vue'
import {
ref,
watch,
onServerPrefetch,
computed,
onMounted,
onBeforeUnmount
} from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useOtuStore } from '../store/store'
import { useHead } from 'unhead'
Expand Down Expand Up @@ -119,6 +126,10 @@ onMounted(async () => {
}
})
onBeforeUnmount(() => {
store.$reset()
})
async function loadInitialData() {
store.$reset()
await store.loadInit(route.params.id)
Expand Down

0 comments on commit 5200b96

Please sign in to comment.