Skip to content

Commit

Permalink
Properly iterate and return method descriptors
Browse files Browse the repository at this point in the history
  • Loading branch information
phi2039 committed May 10, 2019
1 parent c72c752 commit b7ce052
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/descriptor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -660,12 +660,12 @@ Service.prototype.toDescriptor = function toDescriptor() {

// Methods
var methods = [];
for (var i = 0; i < this.methodsArray; ++i)
for (var i = 0; i < this.methodsArray.length; ++i)
methods.push(this._methodsArray[i].toDescriptor());

return exports.ServiceDescriptorProto.create({
name: this.name,
methods: methods,
method: methods,
options: toDescriptorOptions(this.options, exports.ServiceOptions)
});
};
Expand Down

0 comments on commit b7ce052

Please sign in to comment.