userdata cannot be an empty string

I set the userdata for an input item in the back xml file. If the data is an empty string by chance, there will be a javascript error on the front end reading:
Uncaught TypeError: Cannot read property ‘nodeValue’ of null

This causes the form not showing.

How can I solve this?

Even if the userdata is not set, there is no error on front-end.
The javascript looks like:


This has an error.

    <item type="input" name="content" label="Content">
        <userdata name="value" />

This has NO error.

    <item type="input" name="content" label="Content" />

The logic is the next: if you haven’t the data to fill this tag - don’t add it. You can add it later via method setUserData()

Ok, Thanks.

I will do it accordingly.
Although I still think it unreasonable.


we will include fix for into the future update