Properly swtich Character.vue over to PRELOAD_CHARACTER

- This was done a while ago, but I just forgot to commit it because I've had a bunch of inactive unstaged changes in Character.vue sitting here for a while. I guess it's time to finally address them, huh?
This commit is contained in:
Xevion
2022-05-22 18:44:25 -05:00
parent 273f532592
commit 5c92c44bd6

View File

@@ -75,9 +75,12 @@ export default {
}) })
} }
}, },
created() {
this.fetchCharacter();
},
methods: { methods: {
fetchCharacter() { fetchCharacter() {
this.$store.dispatch(types.FETCH_CHARACTER, this.$route.params.character) this.$store.dispatch(types.PRELOAD_CHARACTERS)
.then(() => { .then(() => {
this.character = this.$store.getters.getCharacter(this.$route.params.character); this.character = this.$store.getters.getCharacter(this.$route.params.character);
}) })