mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-31 11:35:37 +01:00
fix WI sorting error
This commit is contained in:
parent
dee4ad8794
commit
c9acea8522
@ -1648,9 +1648,9 @@ function getWIElement(name) {
|
||||
*/
|
||||
export function sortWorldInfoEntries(data, { customSort = null } = {}) {
|
||||
const option = $('#world_info_sort_order').find(':selected');
|
||||
const sortField = customSort.sortField ?? option.data('field');
|
||||
const sortOrder = customSort.sortOrder ?? option.data('order');
|
||||
const sortRule = customSort.sortRule ?? option.data('rule');
|
||||
const sortField = customSort?.sortField ?? option.data('field');
|
||||
const sortOrder = customSort?.sortOrder ?? option.data('order');
|
||||
const sortRule = customSort?.sortRule ?? option.data('rule');
|
||||
const orderSign = sortOrder === 'asc' ? 1 : -1;
|
||||
|
||||
if (!data.length) return data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user