mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Fix video sort
This commit is contained in:
parent
276d965295
commit
afa4374ab4
@ -29,7 +29,11 @@ function getVideoSort (value: string, lastSort: string[] = [ 'id', 'ASC' ]) {
|
||||
]
|
||||
}
|
||||
|
||||
return [ field.split('.').concat([ direction ]), lastSort ]
|
||||
const firstSort = typeof field === 'string' ?
|
||||
field.split('.').concat([ direction ]) :
|
||||
[ field, direction ]
|
||||
|
||||
return [ firstSort, lastSort ]
|
||||
}
|
||||
|
||||
function getSortOnModel (model: any, value: string, lastSort: string[] = [ 'id', 'ASC' ]) {
|
||||
|
Loading…
Reference in New Issue
Block a user