Browse files

Drop -unencoded slot entirely when nil

  • Loading branch information...
1 parent 275f79f commit 25d6bd9976ef3305243a5cb43547805d9e8099f7 @cemerick cemerick committed Aug 21, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/main/clojure/clojure/tools/nrepl/transport.clj
View
4 src/main/clojure/clojure/tools/nrepl/transport.clj
@@ -74,7 +74,9 @@
#(let [payload (be/read-bencode in)
unencoded (<bytes (payload "-unencoded"))
to-decode (apply dissoc payload "-unencoded" unencoded)]
- (merge payload {"-unencoded" unencoded} (<bytes to-decode)))
+ (merge (dissoc payload "-unencoded")
+ (when unencoded {"-unencoded" unencoded})
+ (<bytes to-decode)))
#(locking out
(doto out
(be/write-bencode %)

0 comments on commit 25d6bd9

Please sign in to comment.