In the load section for a form, I defined a list that I had already defined in the load section of the list. That overwrote the first list in the globals, causing bugs because various properties were undefined. It wasn't obvious that I did that. We should do something. Prevent it; allow it and log it; don't create a new list and just return the existing one?
Log a warning to the console that a new list is potentially overwriting a previous list, and suggest passing in an ID to the form or list options.
Return an existing list or form from the globals, if it exists. This would allow you to create new scoped list or form objects inside of methods, but essentially act as a singleton for the page components.
In the load section for a form, I defined a list that I had already defined in the load section of the list. That overwrote the first list in the globals, causing bugs because various properties were undefined. It wasn't obvious that I did that. We should do something. Prevent it; allow it and log it; don't create a new list and just return the existing one?