Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
do not show empty brackets when no asset resource is selected (#9186)
Browse files Browse the repository at this point in the history
* do not show empty brackets when no asset resource is selected

* remove console log
  • Loading branch information
aditya-mitra authored Oct 31, 2023
1 parent d262c71 commit 897fde3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/editor/src/components/assets/AssetsPreviewPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ export const AssetsPreviewPanel = React.forwardRef(({ hideHeading }: Props, ref)
<>
{!hideHeading && (
<div style={assetHeadingStyles as React.CSSProperties}>
{`${previewPanel.resourceProps.name} (${previewPanel.resourceProps.size})`}{' '}
{previewPanel.resourceProps.name &&
previewPanel.resourceProps.size &&
`${previewPanel.resourceProps.name} (${previewPanel.resourceProps.size})`}
</div>
)}
{previewPanel.PreviewSource && <previewPanel.PreviewSource resourceProps={previewPanel.resourceProps} />}
Expand Down

0 comments on commit 897fde3

Please sign in to comment.