Skip to content

Commit

Permalink
fix: properly set content type form step (#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
EFF committed Oct 24, 2022
1 parent d10d7e5 commit f713de1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/studio-ui/src/web/actions/index.ts
Expand Up @@ -293,7 +293,7 @@ export const receiveContentItem = createAction('CONTENT/ITEMS/RECEIVE_ONE')
export const fetchContentItem =
(id: string, { force = false, batched = false } = {}) =>
(dispatch, getState): Promise<sdk.ContentElement> => {
if (!force && getState().content.itemsById[id]) {
if (!id || (!force && getState().content.itemsById[id])) {
return Promise.resolve(getState().content.itemsById[id])
}

Expand Down
Expand Up @@ -59,7 +59,7 @@ class SelectContent extends Component<Props, State> {
show: true,
contentType,
activeItemIndex: 0,
step: FormSteps.INITIAL,
step: contentType ? FormSteps.MAIN : FormSteps.INITIAL,
newItemCategory: null,
searchTerm: '',
newItemData: null
Expand Down

0 comments on commit f713de1

Please sign in to comment.