mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-19 22:18:35 +03:00
Fix safe navigation
This commit is contained in:
committed by
GitHub
parent
89a83f78cc
commit
7caaf833dd
@@ -28,7 +28,7 @@ function getSortField<T extends string>(...value: T[]): SortableFields {
|
||||
}, {} as Record<string, SortableFields>);
|
||||
|
||||
for (const name of value) {
|
||||
if (name?.trim().toLowerCase() in fieldByName) {
|
||||
if (name?.trim()?.toLowerCase() in fieldByName) {
|
||||
return fieldByName[name.trim().toLowerCase()];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user