Skip to content

Commit

Permalink
Update getSortablePropertyName() fix for customProperty nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Apr 27, 2019
1 parent fe9c672 commit cbd6815
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/options/sort-order.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,10 @@ module.exports = {

_getSortablePropertyName(node) {
if (node.is('declaration')) {
let property =
node.first('property') ? node.first('property').first() : node.first();
let property = node.first('property');
if (property === null) property = node.first('customProperty');

property = property.first();
return property.is('variable') ? '$variable' : property.content;
}

Expand Down

0 comments on commit cbd6815

Please sign in to comment.