Skip to content

Commit

Permalink
Fix: storeUserAnswer on setActiveItem
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverfoster authored Feb 2, 2024
1 parent b8367cf commit bd5803c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion js/NarrativeModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,10 @@ export default class NarrativeModel extends ItemsComponentModel {
const activeItem = this.getActiveItem();
if (activeItem) numberArray.push(activeItem.get('_index'));
this.set('_userAnswer', numberArray);
}
}

setActiveItem(index) {
super.setActiveItem(index);
this.storeUserAnswer();
}
}

0 comments on commit bd5803c

Please sign in to comment.