Contentful logo

Contentful Community

Removing rich text

I have a rich text property on a parent and child object, and if there is no text in the child, I want to grab it from the parent, so I’d like to rely on it being undefined if it’s empty.

It seems the field is undefined/not included if it has never had any content, but once I type smomething, then remove it again via the admin interface, I always get a rich text document back, with (in my case) a heading and a paragraph node, both being empty.

This is a bit annoying, is this by design, meaning I will have to filter out and decide if it is undenfined or not on my end, or is it more of a bug (I’d personally expect it to go away if I remove all text in the admin interface).