From 1b57e54e68cb6f047e6fe3e0f26c5fea42f63b9a Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 15 Nov 2018 16:30:26 -0800 Subject: [PATCH] refactor: drop usage of _.partial --- packages/grpc-native-core/src/client.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/grpc-native-core/src/client.js b/packages/grpc-native-core/src/client.js index 31a1738c..8cfa19fa 100644 --- a/packages/grpc-native-core/src/client.js +++ b/packages/grpc-native-core/src/client.js @@ -939,9 +939,11 @@ exports.makeClientConstructor = function(methods, serviceName, throw new Error('Method names cannot start with $'); } var method_type = common.getMethodType(attrs); - var method_func = _.partial(requester_funcs[method_type], attrs.path, - attrs.requestSerialize, - attrs.responseDeserialize); + var method_func = function() { + return requester_funcs[method_type].apply(this, arguments.concat([ + attrs.path, attrs.requestSerialize, attrs.responseDeserialize + ])); + }; if (class_options.deprecatedArgumentOrder) { ServiceClient.prototype[name] = deprecated_request_wrap[method_type](method_func);