Skip to content

Commit 70db2af

Browse files
committed
- fix bug: should check against null of ending element in parent
before accessing it. - bump version
1 parent 264fc1f commit 70db2af

File tree

6 files changed

+10
-5
lines changed

6 files changed

+10
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Logs
22

3+
## v2.2.1
4+
5+
- fix bug: should check against `null` of ending element in `parent` before accessing it.
6+
7+
38
## v2.2.0
49

510
- support positive and negative list in `cls`.

dist/ldq.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ldq.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "@loadingio/ldquery",
44
"description": "lite jQuery-like HTMLElement shorthands",
55
"license": "MIT",
6-
"version": "2.2.0",
6+
"version": "2.2.1",
77
"files": [
88
"dist/**/*"
99
],

src/ldq.ls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if !(ld$?) =>
2525
if !s => return @
2626
# must match s selector
2727
n = @; while n and n != e and (!n.matches or (n.matches and !n.matches(s))) => n = n.parentNode
28-
if n == e and (!e.matches or !e.matches(s)) => return null
28+
if n == e and (!e or !e.matches or !e.matches(s)) => return null
2929
return n
3030
cls: (o,p,n) ->
3131
if typeof(o) == \object =>

0 commit comments

Comments
 (0)