Skip to content

Commit

Permalink
refactor: allow init the modal for video creation
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoa committed Dec 17, 2024
1 parent fb3c32c commit 09fd30f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/editors/containers/VideoEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const VideoEditor: React.FC<EditorComponent> = ({
}) => {
const intl = useIntl();
const studioViewFinished = useSelector(
(state) => selectors.requests.isFinished(state, { requestKey: RequestKeys.fetchStudioView }),
(state) => selectors.app.isCreateBlock(state)
|| selectors.requests.isFinished(state, { requestKey: RequestKeys.fetchStudioView }),
);
const isLibrary = useSelector(selectors.app.isLibrary) as boolean;
const {
Expand Down
4 changes: 2 additions & 2 deletions src/editors/data/redux/thunkActions/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const selectors = { app: appSelectors, video: videoSelectors };

export const loadVideoData = (selectedVideoId, selectedVideoUrl) => (dispatch, getState) => {
const state = getState();
const blockValueData = state.app.blockValue.data;
let rawVideoData = blockValueData.metadata ? blockValueData.metadata : {};
const blockValueData = state.app?.blockValue?.data;
let rawVideoData = blockValueData?.metadata ? blockValueData.metadata : {};
const rawVideos = Object.values(selectors.app.videos(state));
if (selectedVideoId !== undefined && selectedVideoId !== null) {
const selectedVideo = _.find(rawVideos, video => {
Expand Down

0 comments on commit 09fd30f

Please sign in to comment.