File tree Expand file tree Collapse file tree 2 files changed +59
-55
lines changed
parsing/renderer/__tests__/__snapshots__ Expand file tree Collapse file tree 2 files changed +59
-55
lines changed Original file line number Diff line number Diff line change @@ -99,22 +99,26 @@ export const getSortedChildren = (
99
99
} ;
100
100
} )
101
101
. sort ( ( a , b ) => {
102
- const nameA = a . name . startsWith ( "_" ) ;
103
- const nameB = b . name . startsWith ( "_" ) ;
102
+ const underscoreNameA = a . name . startsWith ( "_" ) ;
103
+ const underscoreNameB = b . name . startsWith ( "_" ) ;
104
104
105
105
if ( a . isMethod && b . isMethod ) {
106
106
return 0 ;
107
107
}
108
108
if ( a . isMethod ) {
109
- return - 1 ;
109
+ return 1 ;
110
110
}
111
111
112
- if ( nameA && nameB ) {
112
+ if ( underscoreNameA && underscoreNameB ) {
113
113
return 0 ;
114
114
}
115
- if ( nameA ) {
115
+ if ( underscoreNameA ) {
116
116
return 1 ;
117
117
}
118
+ if ( ! a . isMethod && ! b . isMethod ) {
119
+ return 0 ;
120
+ }
121
+
118
122
return - 1 ;
119
123
} )
120
124
. filter ( ( element ) => element . name !== "constructor" ) ;
You can’t perform that action at this time.
0 commit comments