File tree 1 file changed +12
-7
lines changed
1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -391,14 +391,19 @@ module.exports = {
391
391
if ( a [ 2 ] !== b [ 2 ] ) {
392
392
// If unprefixed parts are different (i.e. `border` and
393
393
// `color`), compare them:
394
- return a [ 2 ] <= b [ 2 ] ? - 1 : 1 ;
395
- } else {
396
- // If unprefixed parts are identical (i.e. `border` in
397
- // `-moz-border` and `-o-border`), compare prefixes.
398
- // They should go in the same order they are set
399
- // in `prefixes` array.
400
- return prefixes . indexOf ( a [ 1 ] ) <= prefixes . indexOf ( b [ 1 ] ) ? - 1 : 1 ;
394
+ return a [ 2 ] < b [ 2 ] ? - 1 : 1 ;
395
+ }
396
+
397
+ // If unprefixed parts are identical (i.e. `border` in
398
+ // `-moz-border` and `-o-border`), compare prefixes.
399
+ // They should be untouched if they are equal:
400
+ if ( prefixes . indexOf ( a [ 1 ] ) === prefixes . indexOf ( b [ 1 ] ) ) {
401
+ return 0 ;
401
402
}
403
+
404
+ // They should go in the same order they are set
405
+ // in `prefixes` array.
406
+ return prefixes . indexOf ( a [ 1 ] ) < prefixes . indexOf ( b [ 1 ] ) ? - 1 : 1 ;
402
407
} ,
403
408
404
409
_sortNodes ( nodes ) {
You can’t perform that action at this time.
0 commit comments