Skip to content

Commit 549d177

Browse files
committed
Update Modal.react.js
1 parent 956661b commit 549d177

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/components/Modal/Modal.react.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ const Modal = ({
5454

5555
const handleMouseDown = (side) => (e) => {
5656
e.preventDefault();
57-
if (!modalRef.current) return;
57+
if (!modalRef.current) {
58+
return;
59+
}
5860
resizing.current = {
5961
active: true,
6062
side,
@@ -66,7 +68,9 @@ const Modal = ({
6668

6769
const handleMouseMove = useCallback(
6870
(e) => {
69-
if (!resizing.current.active || !modalRef.current) return;
71+
if (!resizing.current.active || !modalRef.current) {
72+
return;
73+
}
7074
const { side, startX, startWidth } = resizing.current;
7175
if (side === 'right') {
7276
let newWidth = startWidth + 2 * (e.clientX - startX);

0 commit comments

Comments
 (0)