Avoid applying alist-get on a non-list object

This commit is contained in:
louie 2019-06-07 20:27:53 +08:00
parent 06c8ff3e79
commit ad151a132f

View file

@ -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