From b7ce052ff9a6e32a1c1ed94e8bac6cac324ac73c Mon Sep 17 00:00:00 2001 From: phi2039 Date: Fri, 10 May 2019 16:55:35 +0000 Subject: [PATCH] Properly iterate and return method descriptors --- ext/descriptor/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/descriptor/index.js b/ext/descriptor/index.js index 0b32d022c..6aafd2ab8 100644 --- a/ext/descriptor/index.js +++ b/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) }); };