Fixed HUGE bug that was crashing the navigation
This commit is contained in:
parent
262d464734
commit
bec0c9a640
|
@ -48,8 +48,8 @@ export function ScanSet(props: Immutable<Props>): JSX.Element {
|
|||
languages: languages,
|
||||
languageExtractor: (item) => item.language?.data?.attributes?.code,
|
||||
transform: (item) => {
|
||||
const newItem = { ...item } as NonNullable<Props["scanSet"][number]>;
|
||||
newItem.pages?.data.sort((a, b) => {
|
||||
(item as NonNullable<Props["scanSet"][number]>).pages?.data.sort(
|
||||
(a, b) => {
|
||||
if (a.attributes?.url && b.attributes?.url) {
|
||||
let aName = getAssetFilename(a.attributes.url);
|
||||
let bName = getAssetFilename(b.attributes.url);
|
||||
|
@ -71,8 +71,9 @@ export function ScanSet(props: Immutable<Props>): JSX.Element {
|
|||
return a.attributes.url.localeCompare(b.attributes.url);
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
return newItem;
|
||||
}
|
||||
);
|
||||
return item;
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue