mirror of
https://github.com/grpc/grpc-node.git
synced 2025-12-08 18:23:54 +00:00
Stop dereferencing an optional parameter without checking it
This commit is contained in:
parent
886b8f1f8b
commit
3bd3e4094f
@ -280,7 +280,9 @@ function makeUnaryRequestFunction(method, serialize, deserialize) {
|
||||
}
|
||||
var client_batch = {};
|
||||
var message = serialize(argument);
|
||||
message.grpcWriteFlags = options.flags;
|
||||
if (options) {
|
||||
message.grpcWriteFlags = options.flags;
|
||||
}
|
||||
client_batch[grpc.opType.SEND_INITIAL_METADATA] = metadata;
|
||||
client_batch[grpc.opType.SEND_MESSAGE] = message;
|
||||
client_batch[grpc.opType.SEND_CLOSE_FROM_CLIENT] = true;
|
||||
@ -416,7 +418,9 @@ function makeServerStreamRequestFunction(method, serialize, deserialize) {
|
||||
}
|
||||
var start_batch = {};
|
||||
var message = serialize(argument);
|
||||
message.grpcWriteFlags = options.flags;
|
||||
if (options) {
|
||||
message.grpcWriteFlags = options.flags;
|
||||
}
|
||||
start_batch[grpc.opType.SEND_INITIAL_METADATA] = metadata;
|
||||
start_batch[grpc.opType.RECV_INITIAL_METADATA] = true;
|
||||
start_batch[grpc.opType.SEND_MESSAGE] = message;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user