mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 09:07:47 +01:00
Fix safe navigation
This commit is contained in:
parent
89a83f78cc
commit
7caaf833dd
1 changed files with 1 additions and 1 deletions
|
@ -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()];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue