Using JavaScript reserved words as names of inputs in Custom widgets causes undefined behavior

Wanted to share here as either a bug report or gap in documentation. We are developing a custom widget that operates on an object type where one of the fields is named “length”. We were finding that it was misbehaving: specifically, if we passed in an integer rather than a float, it caused undefined behavior.
Upon developing our hypothesis, we experimented with other reserved Javascript words like “prototype” and found that this also caused the same kinds of undefined behavior.
If this is a bug and not a feature, I’m happy to work with the Tulip team to provide more information.

1 Like

HI @Fifi -

Thanks for bringing this up. The Tulip Team checked on this and we were able to recreate the same behavior you are noticing. This is indeed a bug, and we have filed an internal ticket to work on this.

No time estimate yet for when it will be fixed, but we will follow up in this thread if we have additional questions and will let you know once it is implemented!

1 Like