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

Commit ba7d5e3

Browse files
authored
fix: hide component inspector overlay when bounds is incomplete (#238)
1 parent 13b054e commit ba7d5e3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/node/src/views/ComponentInspector.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const inspectorCardStyle = computed(() => ({ top: props.bounds.top < 35 ? 0 : '-
2424
</script>
2525

2626
<template>
27-
<div class="vue-devtools-component-inspector" :style="inspectorStyle">
27+
<div v-show="bounds.width || bounds.height" class="vue-devtools-component-inspector" :style="inspectorStyle">
2828
<span class="vue-devtools-component-inspector-card" :style="inspectorCardStyle">
2929
&lt;{{ name }}&gt;
3030
<i>{{ Math.round(bounds.width * 100) / 100 }} x {{ Math.round(bounds.height * 100) / 100 }}</i>

packages/node/src/views/Main.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ collectHookBuffer()
288288
/>
289289
</div>
290290
<!-- component inspector -->
291-
<ComponentInspector v-if="overlayVisible" :bounds="bounds" :name="componentName" />
291+
<ComponentInspector v-if="overlayVisible && bounds" :bounds="bounds" :name="componentName" />
292292
<RerenderIndicator />
293293
</template>
294294

0 commit comments

Comments
 (0)