/gist:8b0214e54561ab8be674 Secret
Created
June 20, 2015 04:13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/merkledag/coding.go b/merkledag/coding.go | |
index 6e108c2..1a29a35 100644 | |
--- a/merkledag/coding.go | |
+++ b/merkledag/coding.go | |
@@ -70,7 +70,9 @@ func (n *Node) getPBNode() *pb.PBNode { | |
pbn.Links[i].Hash = []byte(l.Hash) | |
} | |
- pbn.Data = n.Data | |
+ if len(n.Data) > 0 { | |
+ pbn.Data = n.Data | |
+ } | |
return pbn | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment