diff --git a/src/components/deckselection/DeckSelection.vue b/src/components/deckselection/DeckSelection.vue index 2c90625..38da62f 100644 --- a/src/components/deckselection/DeckSelection.vue +++ b/src/components/deckselection/DeckSelection.vue @@ -56,10 +56,10 @@ export default { }, created() { this.$eventHub.$on("askForConfirmationToDeleteSelectedDecks", () => { - this.$refs.confirmDelete.show(); + if (this.$refs.confirmDelete) this.$refs.confirmDelete.show(); }); this.$eventHub.$on("showInfoForSelectedDeck", () => { - this.$refs.info.show(); + if (this.$refs.info) this.$refs.info.show(); }); }, data() { diff --git a/src/components/learn/Learn.vue b/src/components/learn/Learn.vue index 38d316e..415799f 100644 --- a/src/components/learn/Learn.vue +++ b/src/components/learn/Learn.vue @@ -59,7 +59,7 @@ Morbi tempor quis justo vitae imperdiet.`, }, created() { this.$eventHub.$on("askForConfirmationToQuitLearning", () => { - this.$refs.confirmQuit.show(); + if (this.$refs.confirmQuit) this.$refs.confirmQuit.show(); }); }, beforeMount() {