Skip to content

Commit

Permalink
fix type answer race condition
Browse files Browse the repository at this point in the history
user may hit enter before the question has been written, due to fade out
delay
  • Loading branch information
dae committed Oct 24, 2017
1 parent 1cc2927 commit 944bca0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aqt/reviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def _getTypedAnswer(self):
self.web.evalWithCallback("typeans ? typeans.value : null", self._onTypedAnswer)

def _onTypedAnswer(self, val):
self.typedAnswer = val
self.typedAnswer = val or ""
self._showAnswer()

# Bottom bar
Expand Down

0 comments on commit 944bca0

Please sign in to comment.