Skip to content

Commit

Permalink
Drop -unencoded slot entirely when nil
Browse files Browse the repository at this point in the history
  • Loading branch information
cemerick committed Aug 21, 2012
1 parent 275f79f commit 25d6bd9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/clojure/clojure/tools/nrepl/transport.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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 %)
Expand Down

0 comments on commit 25d6bd9

Please sign in to comment.