aboutsummaryrefslogtreecommitdiff
path: root/sx-question.el
diff options
context:
space:
mode:
authorArtur Malabarba <Malabarba@users.noreply.github.com>2015-04-06 20:35:45 +0100
committerArtur Malabarba <Malabarba@users.noreply.github.com>2015-04-06 20:35:45 +0100
commite78510b2d4fd0efe9da9bbe1daa2c7e3d54984d9 (patch)
treea77f76bedf059304be80d517f25b91adb2428ac1 /sx-question.el
parent517dfb1d5ee199ede3ebdafe2654be33e4798571 (diff)
parent010bcf7ec726d588aa6cb59955ea1cd363a60935 (diff)
Merge pull request #269 from vermiculus/json-false
Json false
Diffstat (limited to 'sx-question.el')
-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")