We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ba2296 commit 15a9572Copy full SHA for 15a9572
src/courseware/course/sidebar/sidebars/course-outline/hooks.js
@@ -74,9 +74,11 @@ export const useCourseOutlineSidebar = () => {
74
75
const handleUnitClick = ({ sequenceId, activeUnitId, id }) => {
76
const logEvent = (eventName, widgetPlacement) => {
77
- const findSequenceByUnitId = (unitId) => {
78
- if (!unitId) return null;
79
- return Object.values(sequences).find(seq => seq.unitIds.includes(unitId));
+ const findSequenceByUnitId = (searchUnitId) => {
+ if (!searchUnitId) {
+ return null;
80
+ }
81
+ return Object.values(sequences).find(seq => seq.unitIds.includes(searchUnitId));
82
};
83
const activeSequence = findSequenceByUnitId(activeUnitId);
84
const targetSequence = findSequenceByUnitId(id);
0 commit comments