Skip to content

Commit

Permalink
fix(DismissableLayer): branch could be null
Browse files Browse the repository at this point in the history
  • Loading branch information
rankjie authored Aug 28, 2024
1 parent d1695a9 commit 8336856
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/radix-vue/src/DismissableLayer/DismissableLayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const isPointerEventsEnabled = computed(() => {
const pointerDownOutside = usePointerDownOutside(async (event) => {
const isPointerDownOnBranch = [...context.branches].some(branch =>
branch.contains(event.target as HTMLElement),
branch?.contains(event.target as HTMLElement),
)
if (!isPointerEventsEnabled.value || isPointerDownOnBranch)
Expand All @@ -117,7 +117,7 @@ const pointerDownOutside = usePointerDownOutside(async (event) => {
const focusOutside = useFocusOutside((event) => {
const isFocusInBranch = [...context.branches].some(branch =>
branch.contains(event.target as HTMLElement),
branch?.contains(event.target as HTMLElement),
)
if (isFocusInBranch)
Expand Down

0 comments on commit 8336856

Please sign in to comment.