Opened 9 years ago
Closed 8 years ago
#17585 closed defect (invalid)
dijit/form/_FormSelectWidget: this.options might be NodeList
Reported by: | sunxcint | Owned by: | sunxcint |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Dijit - Form | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
In _fillContent()
of dijit/form/_FormSelectWidget, if query("> *", this.srcNodeRef)
returns a NodeList
with zero members, this.options
will just be set as this zero-length NodeList
, which could be the case when coding declaratively with a store as the data provider.
Even current code works(thanks to duck-typing), it will bring much confusion and difficulties to users taking this module as a base class. I suggest an empty array(i.e. []
) be returned directly if this.store
is not null(or in any cases where query("> *", this.srcNodeRef)
might return a zero-length NodeList
).
Change History (2)
comment:1 Changed 8 years ago by
Owner: | set to sunxcint |
---|---|
Status: | new → pending |
comment:2 Changed 8 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
Are you saying that zero members (as contrasted with, for example, 5 members) is a special case?
I looked at the current code and AFAICT it calls map() regardless of how many elements there are: