Skip to content

Commit fe9c672

Browse files
avdieievjdalton
avdieiev
authored andcommitted
Fix bug in getSortablePropertyName for parse CSS custom properties, #537
1 parent 901a6ff commit fe9c672

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/options/sort-order.js

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

172172
_getSortablePropertyName(node) {
173173
if (node.is('declaration')) {
174-
let property = node.first('property').first();
174+
let property =
175+
node.first('property') ? node.first('property').first() : node.first();
175176
return property.is('variable') ? '$variable' : property.content;
176177
}
177178

0 commit comments

Comments
 (0)