Skip to content

Commit 7bbecde

Browse files
committed
lint fix
1 parent 44b1036 commit 7bbecde

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/components/ContextMenu/ContextMenu.react.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ const getPositionToFitVisibleScreen = (
1616
mainItemCount = 0,
1717
subItemCount = 0
1818
) => {
19-
if (!ref.current) return;
19+
if (!ref.current) {
20+
return;
21+
}
2022

2123
const elBox = ref.current.getBoundingClientRect();
2224
const menuHeight = elBox.height;
@@ -73,12 +75,12 @@ const MenuSection = ({ level, items, path, setPath, hide, parentItemCount = 0 })
7375

7476
const style = position
7577
? {
76-
transform: `translate(${position.x}px, ${position.y}px)`,
77-
maxHeight: '80vh',
78-
overflowY: 'auto',
79-
opacity: 1,
80-
position: 'absolute',
81-
}
78+
transform: `translate(${position.x}px, ${position.y}px)`,
79+
maxHeight: '80vh',
80+
overflowY: 'auto',
81+
opacity: 1,
82+
position: 'absolute',
83+
}
8284
: {};
8385

8486
return (
@@ -138,7 +140,9 @@ const ContextMenu = ({ x, y, items }) => {
138140
};
139141
}, []);
140142

141-
if (!visible) return null;
143+
if (!visible) {
144+
return null;
145+
}
142146

143147
const getItemsFromLevel = level => {
144148
let result = items;

0 commit comments

Comments
 (0)