Skip to content

Commit

Permalink
feat: support map key use Long.toString when is Long protobufjs#1203
Browse files Browse the repository at this point in the history
  • Loading branch information
kurthe committed Dec 7, 2021
1 parent d13d5d5 commit 5e38c52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/decoder.js
Expand Up @@ -72,7 +72,7 @@ function decoder(mtype) {
("}");

if (types.long[field.keyType] !== undefined) gen
("%s[typeof k===\"object\"?util.longToHash(k):k]=value", ref);
("%s[util.Long.isLong(k)?k.toString():typeof k===\"object\"?util.longToHash(k):k]=value", ref);
else gen
("%s[k]=value", ref);

Expand Down

0 comments on commit 5e38c52

Please sign in to comment.