Skip to content

Commit

Permalink
Avoid applying alist-get on a non-list object
Browse files Browse the repository at this point in the history
  • Loading branch information
louietan committed Jun 7, 2019
1 parent 06c8ff3 commit ad151a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion anki-editor.el
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ See https://apps.ankiweb.net/docs/manual.html#latex-conflicts.")

(defun anki-editor--anki-connect-invoke-multi (&rest actions)
(-zip-with (lambda (result handler)
(when-let ((err (alist-get 'error result)))
(when-let (((listp result))
(err (alist-get 'error result)))
(error err))
(and handler (funcall handler result)))
(anki-editor--anki-connect-invoke-result
Expand Down

0 comments on commit ad151a1

Please sign in to comment.