node_query 1.8.0 → 1.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3638d51ca40eb891535cc2320377e3492023439946460a1c0a81af02f211c3ce
4
- data.tar.gz: 4919be334676677f9ad144db4358be354ca81f8244294e3ea1fbf07d6d0a9845
3
+ metadata.gz: 3dec6cb33f976a8d4eab33d781441941dad502fe794ced0b22ee37e2ef15afd0
4
+ data.tar.gz: 50b703ba607c8efe543fa4a019d84959416795d6fe199b7320eb6f2c0fe454dd
5
5
  SHA512:
6
- metadata.gz: af54774545d5b284e3d6bd1977094f108553526fc9613ceebe0c96e46be9ac26c5c66db2e4301cef483cf66e4c02f04f19e1e8180e8025d360e5c2b0437c2efa
7
- data.tar.gz: ca74ee091e6ec5d603ce4efaed4927e4d08a123563f95f7e09807e7c8433447ef53390ba727f7500037d60fc74ea5fb1601dfeba52e2cc569e54bd25eea14fc9
6
+ metadata.gz: 9b7232c12af438ecbc69dfd24ee62c6f3c60be26760047afa95154d862da50a098c9079f4c744d15f31ab34e319a2bc8a874fb4d4fb396143f2a6e5e802f7d2f
7
+ data.tar.gz: 60afc766f3d6e4b3cf44efc3e7bf6fac3b7256b8ce47831311ac3fef6a23768bb40ec5d0c5ae6bdf6193dbba6bf40f6349aa71f9d7726a1c9ecf1841ed565fe3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.8.1 (2022-10-15)
4
+
5
+ * Fix `filter_by_position` with empty nodes
6
+
3
7
  ## 1.8.0 (2022-10-14)
4
8
 
5
9
  * Support `:first-child` and `:last-child`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- node_query (1.8.0)
4
+ node_query (1.8.1)
5
5
  activesupport (< 7.0.0)
6
6
 
7
7
  GEM
@@ -98,6 +98,7 @@ module NodeQuery::Compiler
98
98
  # @return [Array<Node>|Node] first node or last node or nodes
99
99
  def filter_by_position(nodes)
100
100
  return nodes unless @position
101
+ return nodes if nodes.empty?
101
102
 
102
103
  case @position
103
104
  when 'first-child'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class NodeQuery
4
- VERSION = "1.8.0"
4
+ VERSION = "1.8.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: node_query
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-14 00:00:00.000000000 Z
11
+ date: 2022-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport