Skip to content

Commit

Permalink
add error handler to check if layout.contextMenu is defined for Trees…
Browse files Browse the repository at this point in the history
… & Tables

Signed-off-by: pogi7 <[email protected]>
  • Loading branch information
pogi7 committed May 15, 2024
1 parent be5430a commit 5b046be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion view/src/components/Table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ function Table({
)}
</tbody>
</table>
{rightClick && (
{rightClick && layout.contextMenu && (
<ContextMenu
selectedElements={iriArray}
top={coordinates.y}
Expand Down
2 changes: 1 addition & 1 deletion view/src/components/Tree/Tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ function Tree({
</ArboristTree>
)}
</FillFlexParent>
{rightClick && (
{rightClick && layout.contextMenu && (
<ContextMenu
selectedElements={iriArray}
top={coordinates.y}
Expand Down

0 comments on commit 5b046be

Please sign in to comment.