Skip to content

Commit

Permalink
fix: properly iterate and return method descriptors
Browse files Browse the repository at this point in the history
Properly iterate and return method descriptors
  • Loading branch information
alexander-fenster authored May 21, 2019
2 parents c72c752 + b7ce052 commit d96bb7a
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 d96bb7a

Please sign in to comment.