Skip to content

Commit

Permalink
fix(VMenu): check if element still exists before closing parent (#20249)
Browse files Browse the repository at this point in the history
fixes #20248
  • Loading branch information
Arinono authored Jul 31, 2024
1 parent 867b2ab commit 560362d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vuetify/src/components/VMenu/VMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const VMenu = genericComponent<OverlaySlots>()({
setTimeout(() => {
if (!openChildren.value &&
!props.persistent &&
(e == null || (e && !isClickInsideElement(e, overlay.value!.contentEl!)))
(e == null || (overlay.value?.contentEl && !isClickInsideElement(e, overlay.value.contentEl)))
) {
isActive.value = false
parent?.closeParents()
Expand Down

0 comments on commit 560362d

Please sign in to comment.