File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,9 @@ export function sortInlineResults(inlineResults: DangerInlineResults[]): DangerI
190
190
191
191
export function sortResults ( results : DangerResults ) : DangerResults {
192
192
const sortByFile = ( a : Violation , b : Violation ) : number => {
193
+ if ( a . file === undefined && b . file === undefined ) {
194
+ return 0 ;
195
+ }
193
196
if ( a . file === undefined ) {
194
197
return - 1
195
198
}
@@ -198,10 +201,13 @@ export function sortResults(results: DangerResults): DangerResults {
198
201
}
199
202
200
203
if ( a . file == b . file ) {
201
- if ( a . line == undefined ) {
204
+ if ( a . line === undefined && b . line === undefined ) {
205
+ return 0 ;
206
+ }
207
+ if ( a . line === undefined ) {
202
208
return - 1
203
209
}
204
- if ( b . line == undefined ) {
210
+ if ( b . line === undefined ) {
205
211
return 1
206
212
}
207
213
You can’t perform that action at this time.
0 commit comments