Skip to content

Commit c36f7e7

Browse files
committed
fix: tour animated
1 parent 8301726 commit c36f7e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

components/vc-tour/hooks/useTarget.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ export default function useTarget(
4343
const [posInfo, setPosInfo] = useState<PosInfo>(null);
4444

4545
const updatePos = () => {
46+
if (!open.value) {
47+
setPosInfo(null);
48+
return;
49+
}
4650
if (targetElement.value) {
4751
// Exist target element. We should scroll and get target position
4852
if (!isInViewPort(targetElement.value) && open.value) {

0 commit comments

Comments
 (0)