mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
add array length check in tagSorter
This commit is contained in:
parent
b46f001d43
commit
5bcf367af6
1 changed files with 2 additions and 2 deletions
|
|
@ -114,8 +114,8 @@ export class AllListsTable extends React.Component<{}, State> {
|
|||
}
|
||||
|
||||
private tagSorter = (a: number[], b: number[], tags: Tag[]): number => {
|
||||
return a
|
||||
? b
|
||||
return a && a.length
|
||||
? b && b.length
|
||||
? a.length === b.length
|
||||
? tags.filter((t: Tag) => a.indexOf(t.id) > -1).map((t: Tag) => t.name).join().toLowerCase() > tags.filter((t: Tag) => b.indexOf(t.id) > -1).map((t: Tag) => t.name).join().toLowerCase()
|
||||
? 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue