Skip to content

Commit 3b8444c

Browse files
fix: BROS-264: Incorrect relations order + small image fix (#8157)
1 parent 5a387e0 commit 3b8444c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

web/libs/editor/src/components/ImageView/ImageView.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ const PixelGridLayer = observer(({ item }) => {
460460
const ZOOM_THRESHOLD = 20;
461461

462462
const visible = item.zoomScale > ZOOM_THRESHOLD;
463-
const { naturalWidth, naturalHeight } = item.currentImageEntity;
463+
const { naturalWidth, naturalHeight } = item.currentImageEntity ?? {};
464464
const { stageWidth, stageHeight } = item;
465465
const imageSmallerThanStage = naturalWidth < stageWidth || naturalHeight < stageHeight;
466466

web/libs/editor/src/components/SidePanels/DetailsPanel/Relations.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ interface RelationsListProps {
3232
const RelationsList: FC<RelationsListProps> = observer(({ relations }) => {
3333
return (
3434
<>
35-
{relations.map((rel, i) => {
36-
return <RelationItem key={i} relation={rel} />;
35+
{relations.map((rel) => {
36+
return <RelationItem key={rel.id} relation={rel} />;
3737
})}
3838
</>
3939
);

0 commit comments

Comments
 (0)