Permalink
Browse files

no reason to treat nil data differently

  • Loading branch information...
sigma committed Jan 8, 2012
1 parent 841a604 commit d8ee3f21079f7ae89d3be9bcd47d686014bc52a1
Showing with 5 additions and 6 deletions.
  1. +5 −6 gh-api.el
View
@@ -164,12 +164,11 @@
(prog1 (nreverse res) (setcdr res list)))
(car list))))
(let ((data (oref resp :data)))
(when data
(dolist (cb (gh-api-copy-list (oref resp :callbacks)))
(if (or (functionp cb) (symbolp cb))
(funcall cb data)
(apply (car cb) data (cdr cb)))
(object-remove-from-list resp :callbacks cb))))))
(dolist (cb (gh-api-copy-list (oref resp :callbacks)))
(if (or (functionp cb) (symbolp cb))
(funcall cb data)
(apply (car cb) data (cdr cb)))
(object-remove-from-list resp :callbacks cb)))))
(defmethod gh-api-add-response-callback ((resp gh-api-response) callback)
(object-add-to-list resp :callbacks callback t)

0 comments on commit d8ee3f2

Please sign in to comment.