postcss-nested 5.0.4 → 5.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Change Log
2
2
  This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
+ ## 5.0.5
5
+ * Fixed `,` at the tail (by Jesse de Boer).
6
+
4
7
  ## 5.0.4
5
8
  * Fixed nested `&` at the tail (by Raphael Luba).
6
9
  * Fixed docs (by Samuel Charpentier).
package/index.js CHANGED
@@ -43,13 +43,15 @@ function selectors (parent, child) {
43
43
  let parentNode = parse(i, parent)
44
44
 
45
45
  child.selectors.forEach(j => {
46
- let node = parse(j, child)
47
- let replaced = replace(node, parentNode)
48
- if (!replaced) {
49
- node.prepend(parser.combinator({ value: ' ' }))
50
- node.prepend(parentNode.clone())
46
+ if (j.length) {
47
+ let node = parse(j, child)
48
+ let replaced = replace(node, parentNode)
49
+ if (!replaced) {
50
+ node.prepend(parser.combinator({ value: ' ' }))
51
+ node.prepend(parentNode.clone())
52
+ }
53
+ result.push(node.toString())
51
54
  }
52
- result.push(node.toString())
53
55
  })
54
56
  })
55
57
  return result
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss-nested",
3
- "version": "5.0.4",
3
+ "version": "5.0.5",
4
4
  "description": "PostCSS plugin to unwrap nested rules like how Sass does it",
5
5
  "keywords": [
6
6
  "postcss",