🐛 Only set parent
and ancestor
when not empty
#294
Merged
parent
and ancestor
when not empty
#294