Opened 5 years ago

Closed 5 years ago

#18874 closed defect (wontfix)

dijit.Tree: faulty return value of function getNodesByItem for unknown items

Reported by: reisner Owned by:
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.10.3
Keywords: Cc:
Blocked By: Blocking:


If the passed item is unknown to the tree the return value of getNodesByItem should be an empty array. Instead an array with 'undefined' as its single element is returned.

So instead of

return [].concat(this._itemNodesMap[identity])

the following would fix that problem:

return [].concat(this._itemNodesMap[identity] || [])

Change History (1)

comment:1 Changed 5 years ago by bill

Component: GeneralDijit
Resolution: wontfix
Status: newclosed

Sorry, but the spec doesn't promise anything about what that method does when you pass an illegal value for identity. If anything it should probably throw an exception, but we don't normally do that sort of thing to avoid code bloat.

Note: See TracTickets for help on using tickets.