Fix zip image ordering
This commit is contained in:
@@ -18,15 +18,10 @@ export async function unzipManga(file: File) {
|
||||
const unzippedFiles: Record<string, File> = {};
|
||||
|
||||
const sortedEntries = entries.sort((a, b) => {
|
||||
if (a.filename < b.filename) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (a.filename > b.filename) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return a.filename.localeCompare(b.filename, undefined, {
|
||||
numeric: true,
|
||||
sensitivity: 'base'
|
||||
});
|
||||
})
|
||||
|
||||
for (const entry of sortedEntries) {
|
||||
|
||||
Reference in New Issue
Block a user