mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-01-11 15:57:33 +01:00
fix the correct base point for sorting
This commit is contained in:
parent
5532b81285
commit
796881f35d
@ -19,6 +19,7 @@ import { IRouter } from "../../ui/Router";
|
||||
import { Faction } from "../Faction";
|
||||
import { joinFaction } from "../FactionHelpers";
|
||||
import { Factions } from "../Factions";
|
||||
import { FactionNames } from "../data/FactionNames";
|
||||
|
||||
export const InvitationsSeen: string[] = [];
|
||||
|
||||
@ -79,9 +80,10 @@ export function FactionsRoot(props: IProps): React.ReactElement {
|
||||
(augmentation: string) => !player.hasAugmentation(augmentation)
|
||||
).length;
|
||||
}
|
||||
let allJoinedFactions = props.player.factions
|
||||
allJoinedFactions = allJoinedFactions.sort((a, b) =>
|
||||
allJoinedFactions.indexOf(a) - allJoinedFactions.indexOf(b));
|
||||
|
||||
const allFactions = Object.values(FactionNames).map(faction => faction as string)
|
||||
const allJoinedFactions = props.player.factions.sort((a, b) =>
|
||||
allFactions.indexOf(a) - allFactions.indexOf(b));
|
||||
|
||||
return (
|
||||
<Container disableGutters maxWidth="md" sx={{ mx: 0, mb: 10 }}>
|
||||
|
Loading…
Reference in New Issue
Block a user