Skip to content

Commit

Permalink
fix: error on accessing nullable template ref (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryo-gk committed May 23, 2023
1 parent f6d3446 commit c6372bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/components/STableColumn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ function stopResizeListener() {
}
async function adjustDialogPosition() {
if (!props.dropdown || !isOpen.value) {
const rect = container.value?.getBoundingClientRect()
if (!props.dropdown || !isOpen.value || !rect) {
return
}
startDialogPositionListener()
const rect = container.value.getBoundingClientRect()
await nextTick()
const dialogWidth = dialog.value?.offsetWidth ?? 0
Expand Down
2 changes: 1 addition & 1 deletion lib/composables/Flyout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function useFlyout(container?: Ref<any>) {
}

function closeOnClickOutside(event: any) {
if (!el.value.contains(event.target) && isVisible(el.value)) {
if (!el.value?.contains(event.target) && isVisible(el.value)) {
isOpen.value = false
}
}
Expand Down

0 comments on commit c6372bf

Please sign in to comment.