Skip to content

Commit ce05909

Browse files
committed
fix: revert fix
1 parent 8b5d4ad commit ce05909

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/course-unit/sidebar/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ export const getIconVariant = (visibilityState, published, hasChanges) => {
9999
* @param {string} id - The course unit ID.
100100
* @returns {string} The clear course unit ID extracted from the provided data.
101101
*/
102-
export const extractCourseUnitId = (id) => id.match(/block@(.+)$/)[1];
102+
export const extractCourseUnitId = (id = '') => id.match(/block@(.+)$/)?.[1];

0 commit comments

Comments
 (0)