I have a doc type that contains a repeatable group representing links. It contains two key text fields called "text" (what will be displayed for the link) and "url" (where the link will take you when clicked):
When I create a new document based on this type, it insists on populating the group list with at least one link with null for text and url:
Why is this?
This is forcing me to check that the text or url have actual values in my code since I cycle through the links in a foreach loop. I was expecting that it would skip the foreach loop if the Prismic content editor had no links to add to the document, but because it is initialized with at least one, it enters the foreach loop and I have to check.
I realize I can just easily delete the default link on creating new documents, but is there a way to set it so that it leaves the list initially empty? That way, I don't have to worry about content editors not knowing to delete the default link.