Skip to content

Commit 08eb163

Browse files
committed
Bug fix when current step in undefined
1 parent 1791b83 commit 08eb163

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

intro.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@
214214
tooltipLayer.style.right = null;
215215
tooltipLayer.style.bottom = null;
216216
tooltipLayer.style.left = null;
217+
218+
//prevent error when `this._currentStep` in undefined
219+
if(!this._introItems[this._currentStep]) return;
220+
217221
var currentTooltipPosition = this._introItems[this._currentStep].position;
218222
switch (currentTooltipPosition) {
219223
case 'top':

0 commit comments

Comments
 (0)