Skip to content

Commit 709cecf

Browse files
committed
Fixed possible exception if the user has no joined events / has not joined raidpal
- RaidPalView.js: Fixed events_joined access when missing from body - package.json: Bumped to 2.0.2
1 parent 7a40117 commit 709cecf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dirty-raid",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/kfitzgerald/dirty-raid"

src/raidpal/RaidPalView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export default function RaidPalView() {
9494
// Fetch RP user event data
9595
dispatch(fetchRaidPalUser((err, data) => {
9696
// Preselect the best event
97-
if (data && data.events_joined.length > 0) {
97+
if (data?.events_joined?.length) {
9898

9999
// TODO: compare channel slot to now and choose the closest one, could be participating in multiple events
100100
// let liveEvents = data.events_joined

0 commit comments

Comments
 (0)