Skip to content

Commit 13c83de

Browse files
committed
fix: test
1 parent 630bdf3 commit 13c83de

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/editors/EditorContainer.test.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ jest.mock('react-router', () => ({
88
blockId: 'company-id1',
99
blockType: 'html',
1010
}),
11+
useLocation: () => {},
1112
}));
1213

1314
const props = { learningContextId: 'cOuRsEId' };

src/editors/EditorContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ const EditorContainer: React.FC<Props> = ({
4343
blockId={blockId}
4444
studioEndpointUrl={getConfig().STUDIO_BASE_URL}
4545
lmsEndpointUrl={getConfig().LMS_BASE_URL}
46-
onClose={onClose ? () => onClose(location.state?.from) : undefined}
47-
returnFunction={afterSave ? () => afterSave(location.state?.from) : undefined}
46+
onClose={onClose ? () => onClose(location.state?.from) : null}
47+
returnFunction={afterSave ? () => afterSave(location.state?.from) : null}
4848
/>
4949
</div>
5050
);

0 commit comments

Comments
 (0)