summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-08-06 20:33:48 +0300
committerThanos Apollo <[email protected]>2024-08-06 20:34:28 +0300
commit05cfba7d4edfab7822a9cdd59cbfcd7d54fc1cd2 (patch)
treef192edf08d1d4ab3e7910bd85d6074ebcb599b09
parent6d0852e3cfd9bec67536c6d2c502961f332ca5a4 (diff)
get-note-deck-name: Return nil if deck-id does not exist.
* Return nil if neck does not exist. This is meant to make testing easier.
-rw-r--r--gnosis.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnosis.el b/gnosis.el
index f513df1..bb91de3 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -711,7 +711,7 @@ Set SPLIT to t to split all input given."
(defun gnosis-get-note-deck-name (id)
"Return deck name of note ID."
(let ((deck (gnosis-get 'deck-id 'notes `(= id ,id))))
- (gnosis--get-deck-name deck)))
+ (and deck (gnosis--get-deck-name deck))))
(defun gnosis-get-deck--note (id &optional name)
"Get deck id for note ID.