From 1d0e494b97e15312e9a20edca7ef480afc307dc6 Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Thu, 9 Mar 2023 13:06:02 +0100 Subject: [PATCH] Fix undefined access of nextStep.element See https://github.com/usablica/intro.js/issues/951 See https://github.com/HiDeoo/intro.js-react/issues/33 --- src/core/steps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/steps.js b/src/core/steps.js index 7a4e7aea2..e28dafe09 100644 --- a/src/core/steps.js +++ b/src/core/steps.js @@ -69,7 +69,7 @@ export async function nextStep() { return false; } - if (this._introItems.length <= this._currentStep) { + if (!nextStep) { //end of the intro //check if any callback is defined if (typeof this._introCompleteCallback === "function") {