From cbd6815e9cdd38266f3f0ac518c9458d7cade117 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 26 Apr 2019 23:01:24 -0700 Subject: [PATCH] Update getSortablePropertyName() fix for customProperty nodes --- src/options/sort-order.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/options/sort-order.js b/src/options/sort-order.js index 47be2aaa..91b9c679 100644 --- a/src/options/sort-order.js +++ b/src/options/sort-order.js @@ -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; }