Skip to content

Commit e34311a

Browse files
committed
fix: revert fix
1 parent 982107d commit e34311a

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

src/course-unit/CourseUnit.test.jsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -471,10 +471,6 @@ describe('<CourseUnit />', () => {
471471
id: courseVerticalChildrenMock.children[0].block_id,
472472
});
473473

474-
axiosMock
475-
.onGet(getCourseUnitApiUrl(blockId))
476-
.reply(200, courseUnitIndexMock);
477-
478474
axiosMock
479475
.onPost(postXBlockBaseApiUrl({
480476
parent_locator: blockId,
@@ -2176,10 +2172,6 @@ describe('<CourseUnit />', () => {
21762172
? { ...child, block_type: 'html' }
21772173
: child));
21782174

2179-
axiosMock
2180-
.onGet(getCourseUnitApiUrl(blockId))
2181-
.reply(200, courseUnitIndexMock);
2182-
21832175
axiosMock
21842176
.onPost(postXBlockBaseApiUrl({
21852177
parent_locator: blockId,

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)