Skip to content

Commit

Permalink
fix: Open WearablePreview in the ItemEditor page
Browse files Browse the repository at this point in the history
  • Loading branch information
cyaiox committed Mar 27, 2023
1 parent 37e881f commit 9533dc2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/ItemEditorPage/RightPanel/RightPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import {
isOwner,
resizeImage,
getEmoteCategories,
getEmotePlayModes
getEmotePlayModes,
isModelCategory
} from 'modules/item/utils'
import { isLocked } from 'modules/collection/utils'
import { computeHashes } from 'modules/deployment/contentUtils'
Expand Down Expand Up @@ -231,7 +232,7 @@ export default class RightPanel extends React.PureComponent<Props, State> {
handleOpenThumbnailDialog = () => {
const { selectedItem, onOpenModal } = this.props

if (selectedItem?.type === ItemType.EMOTE) {
if (selectedItem?.type === ItemType.EMOTE || (selectedItem?.data.category && isModelCategory(selectedItem.data.category))) {
onOpenModal('EditThumbnailModal', { onSaveThumbnail: this.handleEmoteThumbnailChange, item: selectedItem })
} else if (this.thumbnailInput.current) {
this.thumbnailInput.current.click()
Expand Down

0 comments on commit 9533dc2

Please sign in to comment.