diff --git a/private/serialization.nim b/private/serialization.nim index 2ea7eb3..3d47c08 100644 --- a/private/serialization.nim +++ b/private/serialization.nim @@ -729,7 +729,7 @@ proc representChild*[T](value: seq[T], ts: TagStyle, c: SerializationContext): proc representChild*[O](value: ref O, ts: TagStyle, c: SerializationContext): RawYamlStream = - if value == nil: + if isNil(value): result = iterator(): YamlStreamEvent = yield scalarEvent("~", yTagNull) elif c.style == asNone: result = representChild(value[], ts, c)