mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-02 10:57:45 +01:00
[chore] Reformat callback
This commit is contained in:
parent
7a598a439a
commit
8333f44e2b
@ -854,15 +854,15 @@ function sortArrayObjectCallback(args, value) {
|
||||
return value;
|
||||
}
|
||||
} else {
|
||||
parsedValue = value
|
||||
parsedValue = value;
|
||||
}
|
||||
if (Array.isArray(parsedValue)) {
|
||||
// always sort lists by value
|
||||
parsedValue.sort(customSortComparitor)
|
||||
parsedValue.sort(customSortComparitor);
|
||||
} else if (typeof parsedValue == 'object') {
|
||||
let keysort = args.keysort;
|
||||
if (isFalseBoolean(keysort)) {
|
||||
parsedValue = Object.keys(parsedValue).sort(function(a,b){return customSortComparitor(parsedValue[a], parsedValue[b])});
|
||||
parsedValue = Object.keys(parsedValue).sort(function (a, b) { return customSortComparitor(parsedValue[a], parsedValue[b]); });
|
||||
} else {
|
||||
parsedValue = Object.keys(parsedValue).sort(customSortComparitor);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user