Skip to content

Commit

Permalink
mapSteps after clicking button to start tour
Browse files Browse the repository at this point in the history
  • Loading branch information
Azbury committed Feb 29, 2024
1 parent 1d463fe commit 0f929f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/handhold.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export default class Handhold {

if (data.steps) {
this._steps = data.steps;
this.mapSteps();
}
if (data.config) this._config = data.config;

Expand Down Expand Up @@ -342,6 +341,7 @@ export default class Handhold {
}

startHandhold() {
this.mapSteps();
this._active = true;

document.body.classList.add('handhold');
Expand Down Expand Up @@ -429,7 +429,7 @@ export default class Handhold {
if (this._startBtn) {
return this._startBtn.addEventListener('click', () => {
if (this._active) return;
if (this._currentStepElement) this.startHandhold();
this.startHandhold();
});
}

Expand Down

0 comments on commit 0f929f2

Please sign in to comment.