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