From 010bcf7ec726d588aa6cb59955ea1cd363a60935 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Wed, 4 Mar 2015 10:43:52 -0300 Subject: Fix more leftover vector references --- sx-question.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sx-question.el b/sx-question.el index 1162eb9..f5c7e86 100644 --- a/sx-question.el +++ b/sx-question.el @@ -53,8 +53,7 @@ If QUESTION-ID doesn't exist on SITE, raise an error." :site site :auth t :filter sx-browse-filter))) - (if (vectorp res) - (elt res 0) + (if res (elt res 0) (error "Couldn't find question %S in %S" question-id site)))) @@ -67,8 +66,7 @@ If ANSWER-ID doesn't exist on SITE, raise an error." :submethod 'questions :auth t :filter sx-browse-filter))) - (if (vectorp res) - (elt res 0) + (if res (elt res 0) (error "Couldn't find answer %S in %S" answer-id site)))) @@ -83,7 +81,7 @@ for the post." :site site :auth t :filter sx-browse-filter))) - (unless (vectorp res) + (unless res (error "Couldn't find comment %S in %S" comment-id site)) (sx-assoc-let (elt res 0) (funcall (if (string= .post_type "answer") -- cgit v1.2.3