emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/mastodon 2a5700a46e 13/47: http: build query str only when


From: ELPA Syncer
Subject: [nongnu] elpa/mastodon 2a5700a46e 13/47: http: build query str only when we have a value
Date: Fri, 13 Oct 2023 19:00:55 -0400 (EDT)

branch: elpa/mastodon
commit 2a5700a46e3d66c049a757856f10eb039cc462fa
Author: marty hiatt <martianhiatus [a t] riseup [d o t] net>
Commit: marty hiatt <martianhiatus [a t] riseup [d o t] net>

    http: build query str only when we have a value
---
 lisp/mastodon-http.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index 94a24fcffc..8741972519 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -118,8 +118,9 @@ Unless UNAUTHENTICATED-P is non-nil."
   ;; url-build-query-string adds 'nil' for empty params so lets stick with our
   ;; own:
   (mapconcat (lambda (p)
-               (concat (url-hexify-string (car p))
-                       "=" (url-hexify-string (cdr p))))
+               (when (cdr p) ; only when value
+                 (concat (url-hexify-string (car p))
+                         "=" (url-hexify-string (cdr p)))))
              params "&"))
 
 (defun mastodon-http--build-array-params-alist (param-str array)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]