Fixes #6902
This commit is contained in:
parent
61f00da4bc
commit
c7cba5e6f0
2 changed files with 16 additions and 1 deletions
|
|
@ -1697,7 +1697,7 @@ proc createConstructor(typeSym, jsonNode: NimNode): NimNode =
|
|||
|
||||
result = quote do:
|
||||
(
|
||||
if `lenientJsonNode`.isNil: `workaround`[`optionGeneric`]() else: some[`optionGeneric`](`value`)
|
||||
if `lenientJsonNode`.isNil or `jsonNode`.kind == JNull: `workaround`[`optionGeneric`]() else: some[`optionGeneric`](`value`)
|
||||
)
|
||||
of "table", "orderedtable":
|
||||
let tableKeyType = typeSym[1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue