Merge pull request #4043 from RSSNext/hotfix/ssr-local-compare-error

fix: handle undefined titles in user group sorting, resolves FOL-2224
This commit is contained in:
Innei 2025-07-01 00:18:06 +08:00 committed by GitHub
commit 74a3b97336
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,8 @@ const groupSubscriptions = (
delete groupFolder[UN_CATEGORIZED]
Reflect.defineProperty(groupFolder, UN_CATEGORIZED, {
value: temp?.sort((a, b) => sortByAlphabet(a.title!, b.title!)) || [],
value:
temp?.sort((a, b) => (a.title && b.title ? sortByAlphabet(a.title, b.title) : 0)) || [],
writable: true,
configurable: true,
enumerable: true,