diff --git a/src/games/FlashcardLearning.js b/src/games/FlashcardLearning.js index 230f106..305a502 100644 --- a/src/games/FlashcardLearning.js +++ b/src/games/FlashcardLearning.js @@ -172,7 +172,10 @@ class FlashcardLearning extends Module { try { this._isActive = true; // Set active before starting this._container = this._config.container; - const content = window.contentLoader ? window.contentLoader.getContent(window.currentChapterId) : this._content; + + // Prioritize content from dependencies (passed by GameLoader) + // Fallback to window.contentLoader only if no content in dependencies + const content = this._content || (window.contentLoader ? window.contentLoader.getContent(window.currentChapterId) : null); if (!content || (!content.vocabulary && !content.sentences)) { throw new Error('No suitable content available for flashcards');