diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-09-21 16:20:14 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-09-22 11:40:46 +0200 |
commit | 6b88c28779bd64aaf56c9d1e0c5fced77a506c0a (patch) | |
tree | 6e43b3f38bfa150d14895f42a936ac69e49bbdaf | |
parent | 334c9ee460bf58873b07064145e7965dcd89aa90 (diff) |
handle empty relationships vector in make-buffer-for
can be empty when doing url-lookup on a mention
-rw-r--r-- | lisp/mastodon-profile.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 012e357..7f78df7 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -461,10 +461,12 @@ Returns a list of lists." (mastodon-profile--account-field account 'statuses_count))) (relationships (mastodon-profile--relationships-get id)) - (followed-by-you (alist-get 'following - (aref relationships 0))) - (follows-you (alist-get 'followed_by - (aref relationships 0))) + (followed-by-you (when (not (seq-empty-p relationships)) + (alist-get 'following + (aref relationships 0)))) + (follows-you (when (not (seq-empty-p relationships)) + (alist-get 'followed_by + (aref relationships 0)))) (followsp (or (equal follows-you 't) (equal followed-by-you 't))) (fields (mastodon-profile--fields-get account)) (pinned (mastodon-profile--get-statuses-pinned account))) |