Skip to content

Commit

Permalink
Merge pull request #1328 from yawnak/fix-1327
Browse files Browse the repository at this point in the history
fix: issue 1327 during code generation
  • Loading branch information
tdakkota authored Oct 16, 2024
2 parents b72b870 + d6350da commit 8a51598
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gen/_template/json/encode.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ if {{ $.Var }}.Set {
{{/* Encode value that implements jx.Encoder with respect to nil semantic */}}
{{- define "json/enc_value" -}}
{{- $t := $.Type -}}
{{- if or ($t.NilSemantic.Invalid) ($t.NilSemantic.Optional) -}}
{{- if or ($t.NilSemantic.Invalid) ($t.NilSemantic.Optional) }}
if {{ $.Var }} != nil {
{{- template "json/enc_field" $ }}
{{ $.Var }}.Encode(e)
Expand Down

0 comments on commit 8a51598

Please sign in to comment.