#7368 closed defect (fixed)
dojo.query throws TypeError on some not-found queries
Reported by: | bitranch | Owned by: | alex |
---|---|---|---|
Priority: | high | Milestone: | 1.3 |
Component: | Query | Version: | 1.1.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
This is with svn trunk as of this morning.
When an id isn't in the document, equivalent queries have very different results. For example, this query returns an empty NodeList
:
dojo.query("#domaindata");
This query throws TypeError: elem is null
:
dojo.query("div#domaindata");
The error is in dojo/_base/query.js line 789 in getSimpleFilterFunc(). It looks like the test is assuming an element exists even though the result set is empty.
Attachments (1)
Change History (6)
comment:1 Changed 14 years ago by
Owner: | changed from anonymous to alex |
---|
comment:2 Changed 14 years ago by
Milestone: | tbd → 1.3 |
---|
Changed 14 years ago by
Attachment: | query4.js.diff added |
---|
[cla][patch] now dojo.query("tagName#elemId") returns [] if elemId doesn't exist
comment:3 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 Changed 13 years ago by
Component: | Core → Query |
---|
Note: See
TracTickets for help on using
tickets.
as per today's meeting, punting these core bugs