Skip to content

Commit

Permalink
fix: selecting components highlighting bounds incorrectly (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
webfansplz authored Jan 2, 2024
1 parent 35855ba commit c7c4c0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/devtools-kit/src/core/component-inspector/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ function inspectFn(e: MouseEvent) {
if (instance) {
inspectInstance = instance
const el = instance.vnode.el as HTMLElement | undefined
if (el && el.nodeType === Node.ELEMENT_NODE) {
const bounds = el.getBoundingClientRect()
if (el) {
const bounds = getComponentBoundingRect(instance)
const name = getInstanceName(instance)
const container = getCotainerElement()
container ? update({ bounds, name }) : create({ bounds, name })
Expand Down

0 comments on commit c7c4c0e

Please sign in to comment.