Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
fix: hide component inspector overlay when bounds is incomplete (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
webfansplz authored Sep 23, 2023
1 parent 13b054e commit ba7d5e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/node/src/views/ComponentInspector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const inspectorCardStyle = computed(() => ({ top: props.bounds.top < 35 ? 0 : '-
</script>

<template>
<div class="vue-devtools-component-inspector" :style="inspectorStyle">
<div v-show="bounds.width || bounds.height" class="vue-devtools-component-inspector" :style="inspectorStyle">
<span class="vue-devtools-component-inspector-card" :style="inspectorCardStyle">
&lt;{{ name }}&gt;
<i>{{ Math.round(bounds.width * 100) / 100 }} x {{ Math.round(bounds.height * 100) / 100 }}</i>
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/views/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ collectHookBuffer()
/>
</div>
<!-- component inspector -->
<ComponentInspector v-if="overlayVisible" :bounds="bounds" :name="componentName" />
<ComponentInspector v-if="overlayVisible && bounds" :bounds="bounds" :name="componentName" />
<RerenderIndicator />
</template>

Expand Down

0 comments on commit ba7d5e3

Please sign in to comment.