aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-03-04 10:43:52 -0300
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-03-04 10:43:52 -0300
commit010bcf7ec726d588aa6cb59955ea1cd363a60935 (patch)
treee07c6b67590ea8e56f3ac7ec2790696ff1afc975
parent3aa5fe99b6f6d7e84a682243e7b8be7b7147c1e5 (diff)
Fix more leftover vector references
-rw-r--r--sx-question.el8
1 files 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")