@rpg-engine/long-bow 0.6.25 → 0.6.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.6.25",
3
+ "version": "0.6.26",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -21,16 +21,16 @@ export const PartyManager: React.FC<IPartyManagerProps> = ({
21
21
  }) => {
22
22
  const invitationActionText = isMobileOrTablet() ? 'Tap' : 'Right click';
23
23
 
24
- // Sort members to ensure the leader is first
25
- const sortedMembers = partyRows
26
- ? [partyRows.leader, ...partyRows.members].sort((a, b) =>
27
- a._id === partyRows.leader._id
28
- ? -1
29
- : b._id === partyRows.leader._id
30
- ? 1
31
- : 0
32
- )
33
- : [];
24
+ const sortedMembers =
25
+ partyRows?.leader && partyRows?.members
26
+ ? [partyRows.leader, ...partyRows.members].sort((a, b) =>
27
+ a._id === partyRows.leader._id
28
+ ? -1
29
+ : b._id === partyRows.leader._id
30
+ ? 1
31
+ : 0
32
+ )
33
+ : [];
34
34
 
35
35
  return (
36
36
  <>