Skip to content

Commit 308f740

Browse files
mmomtchevanthony-redFox
authored andcommitted
correctly sort undefined values
1 parent 66ae8ad commit 308f740

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/sort.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ function compareCommentsByField(field, a, b) {
110110
if (akey && bkey) {
111111
return akey.localeCompare(bkey, undefined, { caseFirst: 'upper' });
112112
}
113+
if (akey) return 1;
114+
if (bkey) return -1;
113115
return 0;
114116
}
115117

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy