diff --git a/src/editors/containers/VideoEditor/index.tsx b/src/editors/containers/VideoEditor/index.tsx index f2ad7c670f..ac7464a826 100644 --- a/src/editors/containers/VideoEditor/index.tsx +++ b/src/editors/containers/VideoEditor/index.tsx @@ -20,7 +20,8 @@ const VideoEditor: React.FC = ({ }) => { 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 { diff --git a/src/editors/data/redux/thunkActions/video.js b/src/editors/data/redux/thunkActions/video.js index 352d989737..842546f6f1 100644 --- a/src/editors/data/redux/thunkActions/video.js +++ b/src/editors/data/redux/thunkActions/video.js @@ -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 => {