Skip to content

Commit

Permalink
Fix bug in getSortablePropertyName for parse CSS custom properties, #537
Browse files Browse the repository at this point in the history
  • Loading branch information
avdieiev authored and jdalton committed Apr 27, 2019
1 parent 901a6ff commit fe9c672
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/options/sort-order.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ module.exports = {

_getSortablePropertyName(node) {
if (node.is('declaration')) {
let property = node.first('property').first();
let property =
node.first('property') ? node.first('property').first() : node.first();
return property.is('variable') ? '$variable' : property.content;
}

Expand Down

0 comments on commit fe9c672

Please sign in to comment.