Fix people details page + pass test
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
import { mapGetters } from "vuex";
|
||||
|
||||
export default {
|
||||
name: "Person",
|
||||
@@ -21,10 +21,13 @@ export default {
|
||||
return uuid.test(params.id);
|
||||
},
|
||||
async asyncData({ params, store }) {
|
||||
await store.dispatch("getPerson", params.id);
|
||||
if (!store.state.people.person.id !== params.id)
|
||||
await store.dispatch("people/getPerson", params.id);
|
||||
},
|
||||
computed: {
|
||||
...mapState(["person"])
|
||||
...mapGetters({
|
||||
person: "people/person"
|
||||
})
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user