Skip to content

Commit

Permalink
feat: gracefully handle commented subject id in URL query param
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilR8 committed Oct 16, 2023
1 parent a191d6f commit cb4ddea
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,13 @@ const setSelectedParams = (subjectsListRef) => (param) => {
(subjectObj) => paramId === subjectObj.id.toString()
)[0];
addSelectedParams({
type: paramType,
id: paramId,
name: getSubjectName(subject),
});
if (subject) {
addSelectedParams({
type: paramType,
id: paramId,
name: getSubjectName(subject),
});
}
});
};
Expand Down

0 comments on commit cb4ddea

Please sign in to comment.