Skip to content

Commit 699ad90

Browse files
committed
fix: test
1 parent fe8f254 commit 699ad90

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
@@ -40,8 +40,8 @@ const EditorContainer: React.FC<Props> = ({
4040
blockId={blockId}
4141
studioEndpointUrl={getConfig().STUDIO_BASE_URL}
4242
lmsEndpointUrl={getConfig().LMS_BASE_URL}
43-
onClose={onClose ? () => onClose(location.state?.from) : undefined}
44-
returnFunction={returnFunction ? () => returnFunction(location.state?.from) : undefined}
43+
onClose={onClose ? () => onClose(location.state?.from) : null}
44+
returnFunction={returnFunction ? () => returnFunction(location.state?.from) : null}
4545
/>
4646
</div>
4747
);

0 commit comments

Comments
 (0)