fix: resolve initialization bugs breaking level indicator and expected preview
- Fix renderLesson to handle null inputEl (CodeMirror replaces textarea) - Fix renderExpectedPreview to use 'solution' property instead of 'solutionCode' - These fixes restore level indicator, expected preview, and auto-run functionality
This commit is contained in:
@@ -239,7 +239,8 @@ export class LessonEngine {
|
||||
renderExpectedPreview() {
|
||||
if (!this.currentLesson) return;
|
||||
|
||||
const solutionCode = this.currentLesson.solutionCode;
|
||||
// Use 'solution' property from lesson JSON (not 'solutionCode')
|
||||
const solutionCode = this.currentLesson.solution;
|
||||
if (!solutionCode) {
|
||||
// No solution code provided, hide the expected pane or show placeholder
|
||||
const expectedContainer = document.getElementById("preview-expected");
|
||||
|
||||
Reference in New Issue
Block a user