We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1f37244 commit c0ef91fCopy full SHA for c0ef91f
packages/components/guide/Guide.tsx
@@ -65,6 +65,8 @@ const Guide: React.FC<GuideProps> = (originalProps) => {
65
66
// 设置高亮层的位置
67
const setHighlightLayerPosition = (highlightLayer: HTMLElement) => {
68
+ if (!highlightLayer) return; // 避免在 setTimeout 中访问时,可能元素已经被摧毁
69
+
70
let { top, left } = getRelativePosition(currentHighlightLayerElm.current);
71
let { width, height } = currentHighlightLayerElm.current.getBoundingClientRect();
72
const highlightPadding = getCurrentCrossProps('highlightPadding');
0 commit comments