Skip to content

Commit

Permalink
don't raise error on $('#') query; simply return empty
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Oct 3, 2012
1 parent fc62527 commit 5864eff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/zepto.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var Zepto = (function() {
},
readyRE = /complete|loaded|interactive/,
classSelectorRE = /^\.([\w-]+)$/,
idSelectorRE = /^#([\w-]+)$/,
idSelectorRE = /^#([\w-]*)$/,
tagSelectorRE = /^[\w-]+$/,
toString = {}.toString,
zepto = {},
Expand Down
1 change: 1 addition & 0 deletions test/zepto.html
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ <h1>Zepto DOM unit tests</h1>
t.assertLength(0, $(undefined))
t.assertLength(0, $(false))
t.assertLength(0, $(''))
t.assertLength(0, $('#'))

var Z1 = $(null), Z2 = $(null)
t.assert(Z1 !== Z2)
Expand Down

0 comments on commit 5864eff

Please sign in to comment.