mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -04:00
refactor: simplify if-clause with de morgan's laws
This commit is contained in:
parent
3c4c05a4d6
commit
447fd6d0c1
1 changed files with 3 additions and 3 deletions
|
@ -308,10 +308,10 @@ require("anki/ui").loaded.then(() => require("anki/NoteEditor").instances[0].too
|
|||
else:
|
||||
image_element = ""
|
||||
|
||||
if label or not image_element:
|
||||
label_element = label or cmd
|
||||
else:
|
||||
if not label and image_element:
|
||||
label_element = ""
|
||||
else:
|
||||
label_element = label or cmd
|
||||
|
||||
title_attribute = shortcut(title_attribute)
|
||||
cmd_to_toggle_button = "toggleEditorButton(this);" if toggleable else ""
|
||||
|
|
Loading…
Reference in a new issue