8000 fix: properly iterate and return method descriptors · protobufjs/protobuf.js@d96bb7a · GitHub
[go: up one dir, main page]

Skip to content

Commit d96bb7a

Browse files
fix: properly iterate and return method descripto 8000 rs
Properly iterate and return method descriptors
2 parents c72c752 + b7ce052 commit d96bb7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/descriptor/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,12 +660,12 @@ Service.prototype.toDescriptor = function toDescriptor() {
660660

661661
// Methods
662662
var methods = [];
663-
for (var i = 0; i < this.methodsArray; ++i)
663+
for (var i = 0; i < this.methodsArray.length; ++i)
664664
methods.push(this._methodsArray[i].toDescriptor());
665665

666666
return exports.ServiceDescriptorProto.create({
667667
name: this.name,
668-
methods: methods,
668+
method: methods,
669669
options: toDescriptorOptions(this.options, exports.ServiceOptions)
670670
});
671671
};

0 commit comments

Comments
 (0)
0