diff --git a/frontend/src/views/social/VocabLessonView.vue b/frontend/src/views/social/VocabLessonView.vue index e8ce0e8..6d846f1 100644 --- a/frontend/src/views/social/VocabLessonView.vue +++ b/frontend/src/views/social/VocabLessonView.vue @@ -264,7 +264,10 @@ export default { computed: { ...mapGetters(['user']), hasExercises() { - return this.lesson && this.lesson.grammarExercises && this.lesson.grammarExercises.length > 0; + if (!this.lesson) return false; + if (!this.lesson.grammarExercises) return false; + if (!Array.isArray(this.lesson.grammarExercises)) return false; + return this.lesson.grammarExercises.length > 0; }, grammarExplanations() { // Extrahiere Grammatik-Erklärungen aus den Übungen @@ -365,9 +368,6 @@ export default { } } }, - computed: { - ...mapGetters(['user']) - }, watch: { courseId() { this.loadLesson(); @@ -390,6 +390,8 @@ export default { console.log('[VocabLessonView] Anzahl Übungen:', this.lesson?.grammarExercises?.length || 0); console.log('[VocabLessonView] activeTab:', this.activeTab); console.log('[VocabLessonView] hasExercises:', this.hasExercises); + console.log('[VocabLessonView] importantVocab:', this.importantVocab); + console.log('[VocabLessonView] grammarExplanations:', this.grammarExplanations); // Initialisiere Übungen aus der Lektion oder lade sie separat if (this.lesson && this.lesson.id) { if (this.lesson.grammarExercises && this.lesson.grammarExercises.length > 0) {