diff --git a/dist/js/Mixin.js b/dist/js/Mixin.js index e993c1b..8f0f6f5 100644 --- a/dist/js/Mixin.js +++ b/dist/js/Mixin.js @@ -176,8 +176,8 @@ module.exports = function(settings, done) { renderCurrentStep: function() { var element = null; var currentStep = this.settings.steps[this.state.currentIndex]; - var $target = $(currentStep.element); - var cssPosition = $target.css('position'); + var $target = currentStep && currentStep.element ? $(currentStep.element) : null; + var cssPosition = $target ? $target.css('position') : null; if ( $target && $target.length ) { if ( this.state.showTooltip ) { diff --git a/lib/js/Mixin.js b/lib/js/Mixin.js index 4ceb558..a362829 100644 --- a/lib/js/Mixin.js +++ b/lib/js/Mixin.js @@ -176,8 +176,8 @@ module.exports = function(settings, done) { renderCurrentStep: function() { var element = null; var currentStep = this.settings.steps[this.state.currentIndex]; - var $target = $(currentStep.element); - var cssPosition = $target.css('position'); + var $target = currentStep && currentStep.element ? $(currentStep.element) : null; + var cssPosition = $target ? $target.css('position') : null; if ( $target && $target.length ) { if ( this.state.showTooltip ) {