mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 00:36:38 -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:
|
else:
|
||||||
image_element = ""
|
image_element = ""
|
||||||
|
|
||||||
if label or not image_element:
|
if not label and image_element:
|
||||||
label_element = label or cmd
|
|
||||||
else:
|
|
||||||
label_element = ""
|
label_element = ""
|
||||||
|
else:
|
||||||
|
label_element = label or cmd
|
||||||
|
|
||||||
title_attribute = shortcut(title_attribute)
|
title_attribute = shortcut(title_attribute)
|
||||||
cmd_to_toggle_button = "toggleEditorButton(this);" if toggleable else ""
|
cmd_to_toggle_button = "toggleEditorButton(this);" if toggleable else ""
|
||||||
|
|
Loading…
Reference in a new issue