Skip to content

Commit cbd6815

Browse files
committed
Update getSortablePropertyName() fix for customProperty nodes
1 parent fe9c672 commit cbd6815

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/options/sort-order.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,10 @@ module.exports = {
171171

172172
_getSortablePropertyName(node) {
173173
if (node.is('declaration')) {
174-
let property =
175-
node.first('property') ? node.first('property').first() : node.first();
174+
let property = node.first('property');
175+
if (property === null) property = node.first('customProperty');
176+
177+
property = property.first();
176178
return property.is('variable') ? '$variable' : property.content;
177179
}
178180

0 commit comments

Comments
 (0)