branch: elpa/mastodon commit 21c02d8c759c0e93327b6a41ed5c229bf959007b Author: marty hiatt <martianhia...@disroot.org> Commit: marty hiatt <martianhia...@disroot.org>
image cycle: error if no attachments --- lisp/mastodon-tl.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index c3dd77a05e..c9888be473 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1464,7 +1464,9 @@ the URL of the image to the kill buffer instead." (interactive) (let* ((attachments (mastodon-tl--property 'attachments)) (url (plist-get (car attachments) :url))) - (mastodon-tl--view-image-url url attachments))) + (if (not attachments) + (user-error "Toot has no attachments") + (mastodon-tl--view-image-url url attachments)))) (defun mastodon-tl--get-next-image-url () "Return the url for the next image to load.