Skip to content

Commit

Permalink
feat: minor variable declaration improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Migeon committed Feb 20, 2018
1 parent 7481856 commit 262374f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/VStep.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ export default {
}
},
mounted () {
let params = this.step.params ? this.step.params : {}
let params = this.step.params || {}
let targetElement = document.querySelector(this.step.target)
console.log('[Vue Tour] The target element ' + this.step.target + ' of .v-step[id="' + this.hash + '"] is:', targetElement)
// Add a debug mode?
// console.log('[Vue Tour] The target element ' + this.step.target + ' of .v-step[id="' + this.hash + '"] is:', targetElement)
if (targetElement) {
targetElement.scrollIntoView({behavior: 'smooth'})
Expand Down

0 comments on commit 262374f

Please sign in to comment.