diff --git a/webapp/src/components/home/Home.vue b/webapp/src/components/home/Home.vue index 1a69e8e56..cdff7a0a0 100644 --- a/webapp/src/components/home/Home.vue +++ b/webapp/src/components/home/Home.vue @@ -182,7 +182,7 @@ import DISCOllaboratives from "@/components/simple/DISCOllaboratives.vue"; import ButtonsCard from "@/components/containers/ButtonsCard.vue"; import { driver, type DriveStep } from "driver.js"; import "driver.js/dist/driver.css"; -import { watch } from "vue"; +import { nextTick, watch } from "vue"; import { useGuideStore } from "@/store/guide"; const router = useRouter(); @@ -253,11 +253,13 @@ driverObj.drive(); watch( () => guideStoreTraining.showGuide, - (newValue) => { - driverObj.destroy(); - console.log(router.currentRoute.value.path); - if (router.currentRoute.value.path == "/") { + async (newValue) => { + if (driverObj.isActive()) { + await driverObj.destroy(); + } + if (router.currentRoute.value.path === "/") { driverObj.setSteps(steps); + await nextTick(); driverObj.drive(); } }, diff --git a/webapp/src/components/testing/Testing.vue b/webapp/src/components/testing/Testing.vue index b10a14784..f81aa8e27 100644 --- a/webapp/src/components/testing/Testing.vue +++ b/webapp/src/components/testing/Testing.vue @@ -144,7 +144,7 @@