Skip to content

Commit 45aa7bc

Browse files
chpy04Copilot
andauthored
guard against falsy 0
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 2eb8ed3 commit 45aa7bc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/frontend/src/pages/GanttPage/GanttChart/GanttChartSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const GanttTooltipLayer: React.FC<GanttTooltipLayerProps> = ({ updateRef }) => {
3939

4040
updateRef.current = (options, y = 0) => {
4141
setTooltipOptions(options);
42-
if (options && y) setCursorY(y);
42+
if (options && y !== undefined && y !== null) setCursorY(y);
4343
};
4444

4545
if (!tooltipOptions) return null;

0 commit comments

Comments
 (0)