Skip to content

Commit

Permalink
Ensure all listeners are setup before calling render to ensure answer…
Browse files Browse the repository at this point in the history
… gets set.
  • Loading branch information
rtibbles committed Jun 25, 2024
1 parent 13951e3 commit 70a46eb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@
render(renderStateRootElement, this.$refs.perseus);
},
renderNewItem() {
this.renderItem();
// Clear any pending state reset calls
this.$off('itemRendererUpdated');
this.$once('itemRendererUpdated', () => {
Expand All @@ -466,6 +465,7 @@
// so we need to ensure that the itemRenderer is available and up to date first.
this.setAnswer();
});
this.renderItem();
},
_resetState(val) {
if (!val) {
Expand Down

0 comments on commit 70a46eb

Please sign in to comment.