Correct some modal repops (#11739)

* fix(modals): correct some repops

* fix(modals): also clean out "prev"

* refactor(modals): hide in dismiss event
This commit is contained in:
Sabe Jones
2020-01-24 16:36:11 -06:00
committed by GitHub
parent b9d3d7f87a
commit aefd664db1
4 changed files with 25 additions and 4 deletions

View File

@@ -592,7 +592,7 @@ export default {
this.$emit('createChallenge', challenge);
this.resetWorkingChallenge();
this.$root.$emit('bv::hide::modal', 'challenge-modal');
this.$root.$emit('habitica::dismiss-modal', 'challenge-modal');
this.$router.push(`/challenges/${challenge._id}`);
},
async updateChallenge () {
@@ -613,7 +613,7 @@ export default {
const challenge = await this.$store.dispatch('challenges:updateChallenge', { challenge: challengeDetails });
this.$emit('updatedChallenge', { challenge });
this.resetWorkingChallenge();
this.$root.$emit('bv::hide::modal', 'challenge-modal');
this.$root.$emit('habitica::dismiss-modal', 'challenge-modal');
},
toggleCategorySelect () {
this.showCategorySelect = !this.showCategorySelect;