Skip to content

Commit

Permalink
Update ConvertUi.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyBurger committed Jan 14, 2025
1 parent 3f058f1 commit 109a1d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/convert/app/components/ConvertUi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function ConvertUI({
readonly tracks: TracksField | null;
readonly videoThumbnailRef: React.RefObject<VideoThumbnailRef | null>;
readonly unrotatedDimensions: Dimensions | null;
readonly dimensions: Dimensions | null;
readonly dimensions: Dimensions | null | undefined;
readonly duration: number | null;
readonly rotation: number | null;
readonly inputContainer: ParseMediaContainer | null;
Expand Down Expand Up @@ -101,7 +101,9 @@ export default function ConvertUI({
);
const [resizeOperation, setResizeOperation] =
useState<ResizeOperation | null>(() => {
return action.type === 'resize-format' || action.type === 'generic-resize'
return (action.type === 'resize-format' ||
action.type === 'generic-resize') &&
dimensions
? getInitialResizeSuggestion(dimensions)
: null;
});
Expand Down

0 comments on commit 109a1d1

Please sign in to comment.