Skip to content

Commit 46e0c96

Browse files
committed
test fix
1 parent 5d30dc6 commit 46e0c96

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

integration/options-types-only/options.ts

+2-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/schema.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ function encodedOptionsToOptions(
246246
// We should fix this so that we can always create an option definition by
247247
// somehow premptively decoding the encoded value and then inserting it into
248248
// the option defintion.
249+
// please refer to inteegration/options-types-only to see this in action
249250
resultOptions.push(getExtensionValue(ctx, extension, value));
250251
}
251252
}
@@ -257,8 +258,9 @@ function encodedOptionsToOptions(
257258

258259
function shouldAddOptionDefinition(ctx: Context, extension: FieldDescriptorProto) {
259260
return (
260-
extension.type == FieldDescriptorProto_Type.TYPE_MESSAGE &&
261-
(ctx.options.outputEncodeMethods === true || ctx.options.outputEncodeMethods == "decode-only")
261+
extension.type !== FieldDescriptorProto_Type.TYPE_MESSAGE ||
262+
ctx.options.outputEncodeMethods === true ||
263+
ctx.options.outputEncodeMethods == "decode-only"
262264
);
263265
}
264266

0 commit comments

Comments
 (0)