From 0f929f2cb1ec2c7f6772cc408946fa6a9590a000 Mon Sep 17 00:00:00 2001 From: Austin Asbury Date: Thu, 29 Feb 2024 11:30:52 -0500 Subject: [PATCH] mapSteps after clicking button to start tour --- src/handhold.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handhold.mjs b/src/handhold.mjs index 62b105e..4509917 100644 --- a/src/handhold.mjs +++ b/src/handhold.mjs @@ -18,7 +18,6 @@ export default class Handhold { if (data.steps) { this._steps = data.steps; - this.mapSteps(); } if (data.config) this._config = data.config; @@ -342,6 +341,7 @@ export default class Handhold { } startHandhold() { + this.mapSteps(); this._active = true; document.body.classList.add('handhold'); @@ -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(); }); }