branch: elpa/hyperdrive
commit 5943275a3055980106f211e639ae7ff717c68f77
Author: Adam Porter <a...@alphapapa.net>
Commit: Adam Porter <a...@alphapapa.net>

    Fix: (he/api) Rebind modified plists
---
 hyperdrive-lib.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 4e2ad8be8a..63fdadf3fd 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -208,13 +208,13 @@ REST is passed to `h/api', which see.
   (declare (indent defun))
   ;; Always use :as 'response
   (cl-assert (null (plist-get rest :as)))
-  (plist-put rest :as 'response)
-
+  (setf (plist-get rest :as) 'response)
   (pcase-let* (((map :then) rest))
     (when then
-      (plist-put rest :then (lambda (response)
-                              (he//api-then entry response)
-                              (funcall then response))))
+      (setf (plist-get rest :then)
+            (lambda (response)
+              (he//api-then entry response)
+              (funcall then response))))
     (let ((response (apply #'h/api method (he/url entry) rest)))
       (unless then (funcall 'he//api-then entry response))
       response)))

Reply via email to