[ https://issues.apache.org/jira/browse/TAP5-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13547566#comment-13547566 ]
Hudson commented on TAP5-2047: ------------------------------ Integrated in tapestry-trunk-freestyle #999 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/999/]) TAP5-2047: Properly return empty list ElementWrapper.find() locates no matches (Revision 3ef60bc88b916e61bcb637e54c917540ccc56806) Result = SUCCESS hlship : Files : * tapestry-core/src/main/coffeescript/org/apache/tapestry5/t5-core-dom-jquery.coffee > ElementWrapper#find jQuery implementation is broken if there is no match > ------------------------------------------------------------------------ > > Key: TAP5-2047 > URL: https://issues.apache.org/jira/browse/TAP5-2047 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core > Affects Versions: 5.4 > Reporter: Jochen Kemnade > Assignee: Howard M. Lewis Ship > Labels: dom, javascript, jquery, patch > Fix For: 5.4 > > Attachments: > 0001-fix-ElementWrapper-find-for-jQuery-dom-implementatio.patch > > > When `ElementWrapper#find` is called with a selector that does not match any > element, an array of two `ElementWrapper`s with `undefined` elements is > returned. That happens, because the loop that turns the jquery matches into > `ElementWrapper`s iterates from `0` to `matches.length -1`. That means there > is one pass for `i=0` and one pass for `i=-1`, because CoffeeScript ranges > can also be specified from the higher end to the lower one. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira