Component Debugging Question

Hi-

I’m working on a composite component that allows users to add a list of tags.
image

I have an object array/list (private variable) to manage the tags entered, a repeating element to show those tags to the user, and two events - one for tag_added and the other for tag_removed.

Everything works well until I create a node to write to output variables.

I’m using the formula MAP(privateVars.TagList, item.name) to convert the object list (private variable) to a list of texts (output variable).

However, every time I add this node to the logic, the private variable object list adds a blank element to the array. The output variable is also not set up correctly.

I have tried to highlight the issue in the following video:

Can someone help me understand what I am missing?
Also, is there a way to debug the component’s private variables?