From bdf9900f6790e696b55faf514d7553f60e05b6c3 Mon Sep 17 00:00:00 2001 From: James Wyatt Cready-Pyle Date: Fri, 11 Nov 2022 13:41:21 -0500 Subject: [PATCH] Update reflection-merge-partial.ts Fixes: #386 --- packages/runtime/src/reflection-merge-partial.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime/src/reflection-merge-partial.ts b/packages/runtime/src/reflection-merge-partial.ts index 6a69469a..d5cbccf5 100644 --- a/packages/runtime/src/reflection-merge-partial.ts +++ b/packages/runtime/src/reflection-merge-partial.ts @@ -37,7 +37,7 @@ export function reflectionMergePartial(info: MessageInfo, targ if (field.oneof) { const group = input[field.oneof] as UnknownOneofGroup | undefined; // this is the oneof`s group in the source - if (group == undefined) { // the user is free to omit + if (group?.oneofKind == undefined) { // the user is free to omit continue; // we skip this field, and all other members too } fieldValue = group[name]; // our value comes from the the oneof group of the source