Skip to content

Commit 09531f9

Browse files
committed
fix: map being decoded incorrectly
1 parent f8fccab commit 09531f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/descriptor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function getDescriptorRoot(file_descriptor_protos) {
2121
const descriptor = Descriptor.FileDescriptorProto.decode(descriptorByte);
2222
set(descriptorSet, 'file[' + i + ']', descriptor);
2323
});
24-
return protobuf.Root.fromDescriptor(descriptorSet);
24+
return protobuf.Root.fromDescriptor(descriptorSet, {useMapField: true});
2525
}
2626

2727
/**
@@ -31,5 +31,5 @@ export function getDescriptorRoot(file_descriptor_protos) {
3131
*/
3232
// eslint-disable-next-line node/no-unsupported-features/es-syntax
3333
export function getDescriptorRootFromDescriptorSet(file_descriptor_set) {
34-
return protobuf.Root.fromDescriptor(file_descriptor_set);
34+
return protobuf.Root.fromDescriptor(file_descriptor_set, {useMapField: true});
3535
}

0 commit comments

Comments
 (0)