Map current marker problem

Hello!

So, I have a workflow that lets the user click on a map marker which then reveals a repeating group showing details of the marker from the database. This works perfectly until the user clicks on an area of the map that isn’t a pin. Then the repeating group stays open but with no content.

How can I hide the repeating group if the user clicks on any area of the map that is not a pin?

I have tried some conditionals that attempt to make the group invisible if the current marker’s name is empty but is still not hiding the group.