tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject git commit: TAP5-2047: Properly return empty list ElementWrapper.find() locates no matches
Date Wed, 09 Jan 2013 01:43:36 GMT
Updated Branches:
  refs/heads/master 6320748ab -> 3ef60bc88


TAP5-2047: Properly return empty list ElementWrapper.find() locates no matches


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/3ef60bc8
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/3ef60bc8
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/3ef60bc8

Branch: refs/heads/master
Commit: 3ef60bc88b916e61bcb637e54c917540ccc56806
Parents: 6320748
Author: Howard M. Lewis Ship <hlship@apache.org>
Authored: Tue Jan 8 17:43:31 2013 -0800
Committer: Howard M. Lewis Ship <hlship@apache.org>
Committed: Tue Jan 8 17:43:31 2013 -0800

----------------------------------------------------------------------
 .../org/apache/tapestry5/t5-core-dom-jquery.coffee |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3ef60bc8/tapestry-core/src/main/coffeescript/org/apache/tapestry5/t5-core-dom-jquery.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/org/apache/tapestry5/t5-core-dom-jquery.coffee
b/tapestry-core/src/main/coffeescript/org/apache/tapestry5/t5-core-dom-jquery.coffee
index 2b346c6..475676d 100644
--- a/tapestry-core/src/main/coffeescript/org/apache/tapestry5/t5-core-dom-jquery.coffee
+++ b/tapestry-core/src/main/coffeescript/org/apache/tapestry5/t5-core-dom-jquery.coffee
@@ -252,6 +252,8 @@ define ["_", "./utils", "jquery"], (_, utils, $) ->
     find: (selector) ->
       matches = @$.find selector
 
+      return [] if matches.length is 0
+
       for i in [0..(matches.length - 1)]
         new ElementWrapper matches.eq i
 


Mime
View raw message