mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
fix error appearing when undo shortcut pressed when nothing to undo
This commit is contained in:
parent
70e751f6ec
commit
0dc08bbacc
1 changed files with 2 additions and 0 deletions
|
@ -682,6 +682,8 @@ title="%s" %s>%s</button>''' % (
|
|||
|
||||
def onUndo(self):
|
||||
n = self.col.undoName()
|
||||
if not n:
|
||||
return
|
||||
cid = self.col.undo()
|
||||
if cid and self.state == "review":
|
||||
card = self.col.getCard(cid)
|
||||
|
|
Loading…
Reference in a new issue