Update src/Faction/ui/FactionsRoot.tsx

This commit is contained in:
Jack 2022-03-21 23:11:04 +08:00 committed by GitHub
parent 796881f35d
commit 4c862ef313
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -82,7 +82,8 @@ export function FactionsRoot(props: IProps): React.ReactElement {
}
const allFactions = Object.values(FactionNames).map(faction => faction as string)
const allJoinedFactions = props.player.factions.sort((a, b) =>
const allJoinedFactions = props.player.factions.slice(0);
allJoinedFactions.sort((a, b) =>
allFactions.indexOf(a) - allFactions.indexOf(b));
return (