We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8301726 commit c36f7e7Copy full SHA for c36f7e7
components/vc-tour/hooks/useTarget.ts
@@ -43,6 +43,10 @@ export default function useTarget(
43
const [posInfo, setPosInfo] = useState<PosInfo>(null);
44
45
const updatePos = () => {
46
+ if (!open.value) {
47
+ setPosInfo(null);
48
+ return;
49
+ }
50
if (targetElement.value) {
51
// Exist target element. We should scroll and get target position
52
if (!isInViewPort(targetElement.value) && open.value) {
0 commit comments