We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7796e69 commit d35877bCopy full SHA for d35877b
1 file changed
src/components/VTour.vue
@@ -115,10 +115,12 @@ function resetTour() {
115
}
116
117
function highlightTarget(lastStep = null) {
118
- document.querySelector(`${getStep.value.target}`).classList.add("vjt-highlight");
119
- if (lastStep != null) {
120
- document.querySelector(`${props.steps[lastStep].target}`).classList.remove("vjt-highlight");
121
- }
+ let _nextStep = document.querySelector(`${getStep.value?.target}`);
+ let _lastStep = document.querySelector(`${props.steps[lastStep]?.target}`);
+ if(_nextStep === _lastStep) return;
+
122
+ _nextStep.classList.add("vjt-highlight");
123
+ if (_lastStep != null) _lastStep.classList.remove("vjt-highlight");
124
125
126
function recalculatePopper(lastStep) {
0 commit comments