Fix TypeError

`func` is optional for `Array.prototype.sort()`, but `undefined` needs to be used.
This commit is contained in:
awsr
2026-03-19 14:57:18 -07:00
committed by GitHub
parent bbdaaae682
commit ef0573a409
+1 -1
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;