postcss-sorting
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -5,2 +5,5 @@ # Change Log | ||
## 1.4.1 | ||
* Fix issue with a rule content starting with a comment and follow by a rule. Error happens if config has any option except `sort-order`. #21 | ||
## 1.4.0 | ||
@@ -7,0 +10,0 @@ * Added `preserve-empty-lines-between-children-rules`, which preserve empty lines between children rules and preserve empty lines for comments between children rules. #20 |
12
index.js
@@ -188,8 +188,10 @@ var postcss = require('postcss'); | ||
if (prevNode.type === lookFor) { | ||
return node; | ||
} | ||
if (prevNode) { | ||
if (prevNode.type === lookFor) { | ||
return node; | ||
} | ||
if (prevNode.type === 'comment') { | ||
return getApplicableNode(lookFor, prevNode); | ||
if (prevNode.type === 'comment') { | ||
return getApplicableNode(lookFor, prevNode); | ||
} | ||
} | ||
@@ -196,0 +198,0 @@ |
{ | ||
"name": "postcss-sorting", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "PostCSS plugin to sort rules content with specified order.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51434
1495