Skip to content

Commit 1b01373

Browse files
committed
Merge pull request usablica#236 from adrianp/fix-229
fix issue with single-step pages (closes usablica#229)
2 parents 2d0eb69 + ddc7246 commit 1b01373

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

intro.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,11 +584,11 @@
584584
_placeTooltip.call(self, targetElement.element, tooltipLayer, arrowLayer);
585585
}
586586

587-
if (this._currentStep == 0) {
587+
if (this._currentStep == 0 && this._introItems.length > 1) {
588588
prevTooltipButton.className = 'introjs-button introjs-prevbutton introjs-disabled';
589589
nextTooltipButton.className = 'introjs-button introjs-nextbutton';
590590
skipTooltipButton.innerHTML = this._options.skipLabel;
591-
} else if (this._introItems.length - 1 == this._currentStep) {
591+
} else if (this._introItems.length - 1 == this._currentStep || this._introItems.length == 1) {
592592
skipTooltipButton.innerHTML = this._options.doneLabel;
593593
prevTooltipButton.className = 'introjs-button introjs-prevbutton';
594594
nextTooltipButton.className = 'introjs-button introjs-nextbutton introjs-disabled';

0 commit comments

Comments
 (0)