Fix TypeError

`func` is optional for `Array.prototype.sort()`, but `undefined` needs to be used.
pull/4687/head
awsr 2026-03-19 14:57:18 -07:00 committed by GitHub
parent bbdaaae682
commit ef0573a409
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ const gallerySorter = {
resD: { name: 'Resolution Descending', func: (b, a) => a.width * a.height - b.width * b.height },
modA: { name: 'Modified Ascending', func: (a, b) => a.mtime - b.mtime },
modD: { name: 'Modified Descending', func: (b, a) => a.mtime - b.mtime },
none: { name: 'None', func: null },
none: { name: 'None', func: undefined },
};
let sortMode = gallerySorter.none;