Skip to content
Permalink
Browse files
fix: properly iterate and return method descriptors
Properly iterate and return method descriptors
  • Loading branch information
alexander-fenster committed May 21, 2019
2 parents c72c752 + b7ce052 commit d96bb7ae991ca7d5ef8eea3bca75a2089c6f1212
Showing with 2 additions and 2 deletions.
  1. +2 −2 ext/descriptor/index.js
@@ -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)
});
};

0 comments on commit d96bb7a

Please sign in to comment.