Skip to content

Commit

Permalink
fix: image only resizes when both width and height of window is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
THEGOLDENPRO committed May 15, 2024
1 parent 21f4450 commit c0c920d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default function RoseImage(props: Props) {
(event: Event<PhysicalSize>) => {
const size = event.payload;

if (window_size == null || (size.width !== window_size.width && size.height !== window_size.height)) {
if (window_size == null || size.width !== window_size.width || size.height !== window_size.height) {
setWindowSize({width: size.width, height: size.height});
}
}
Expand Down

0 comments on commit c0c920d

Please sign in to comment.