Skip to content

Commit

Permalink
Fixing group detail exercises list reload bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
krulis-martin committed Nov 3, 2021
1 parent 2ed1355 commit 6e7302c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const transformAndSetFilterData = defaultMemoize(
if (rootGroup) {
data.groupsIds = [rootGroup];
}
if (tags.length > 0) {
if (tags && tags.length > 0) {
data.tags = tags;
}

Expand Down
1 change: 1 addition & 0 deletions src/pages/GroupDetail/GroupDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ class GroupDetail extends Component {
isOpen
unlimitedHeight>
<ExercisesListContainer
key={data.id /* this will force component reload if group is switched */}
id={`exercises-group-${data.id}`}
rootGroup={data.id}
showAssignButton={
Expand Down

0 comments on commit 6e7302c

Please sign in to comment.