mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-01 11:56:48 +01:00
Merge pull request #2967 from KhreedAI/staging
Fix World Info Entry Priority Sort
This commit is contained in:
commit
5a52196331
@ -1680,8 +1680,8 @@ export function sortWorldInfoEntries(data, { customSort = null } = {}) {
|
|||||||
} else if (sortRule === 'priority') {
|
} else if (sortRule === 'priority') {
|
||||||
// First constant, then normal, then disabled.
|
// First constant, then normal, then disabled.
|
||||||
primarySort = (a, b) => {
|
primarySort = (a, b) => {
|
||||||
const aValue = a.constant ? 0 : a.disable ? 2 : 1;
|
const aValue = a.disable ? 2 : a.constant ? 0 : 1;
|
||||||
const bValue = b.constant ? 0 : b.disable ? 2 : 1;
|
const bValue = b.disable ? 2 : b.constant ? 0 : 1;
|
||||||
return aValue - bValue;
|
return aValue - bValue;
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user