From 4be833ad1987b586c86b91308ede75ce2c102bc5 Mon Sep 17 00:00:00 2001 From: rashmi73 <41687423+rashmi73@users.noreply.github.com> Date: Sat, 12 Sep 2020 03:40:13 +0530 Subject: [PATCH 1/3] Update index.jsx --- src/shared/components/ProfilePage/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/ProfilePage/index.jsx b/src/shared/components/ProfilePage/index.jsx index 92195ee203..d810d1c3d3 100644 --- a/src/shared/components/ProfilePage/index.jsx +++ b/src/shared/components/ProfilePage/index.jsx @@ -192,7 +192,7 @@ class ProfilePage extends React.Component { info={info} onShowBadges={() => this.setState({ badgesModalOpen: true })} showBadgesButton={achievements && achievements.length > 0} - wins={_.get(stats, 'wins', 0)} + wins={_.get(stats && stats[0] || {}, 'wins', 0)} /> From a6a68d6e1f7177f45d69076fb986e56ec6093d74 Mon Sep 17 00:00:00 2001 From: rashmi73 <41687423+rashmi73@users.noreply.github.com> Date: Sat, 12 Sep 2020 03:56:49 +0530 Subject: [PATCH 2/3] Update index.jsx --- src/shared/components/ProfilePage/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/ProfilePage/index.jsx b/src/shared/components/ProfilePage/index.jsx index d810d1c3d3..74181a61ca 100644 --- a/src/shared/components/ProfilePage/index.jsx +++ b/src/shared/components/ProfilePage/index.jsx @@ -192,7 +192,7 @@ class ProfilePage extends React.Component { info={info} onShowBadges={() => this.setState({ badgesModalOpen: true })} showBadgesButton={achievements && achievements.length > 0} - wins={_.get(stats && stats[0] || {}, 'wins', 0)} + wins={_.get((stats && stats[0]) || {}, 'wins', 0)} /> From ea282e2593a1787334845f1ddd3f4224d0a12b45 Mon Sep 17 00:00:00 2001 From: rashmi73 <41687423+rashmi73@users.noreply.github.com> Date: Sat, 12 Sep 2020 04:29:16 +0530 Subject: [PATCH 3/3] Update index.jsx.snap --- .../shared/components/ProfilePage/__snapshots__/index.jsx.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/shared/components/ProfilePage/__snapshots__/index.jsx.snap b/__tests__/shared/components/ProfilePage/__snapshots__/index.jsx.snap index fb48f813bb..3f8045b9fa 100644 --- a/__tests__/shared/components/ProfilePage/__snapshots__/index.jsx.snap +++ b/__tests__/shared/components/ProfilePage/__snapshots__/index.jsx.snap @@ -58,7 +58,7 @@ exports[`renders a full Profile correctly 1`] = ` } onShowBadges={[Function]} showBadgesButton={true} - wins={3} + wins={0} />