eddiemf / vue-scrollactive

Lightweight and simple to use vue component that highlights menu items as you scroll the page, also scrolling to target section when clicked.
MIT License
542 stars 70 forks source link

TypeError: Cannot read property 'substr' of undefined #83

Closed kartikbhargav11 closed 4 years ago

kartikbhargav11 commented 4 years ago

In Nuxt.js it gives TypeError: Cannot read property 'substr' of undefined on render

rylax commented 3 years ago

Can you share what the solution to your problem was? Facing the exact same issue.

rudashi commented 3 years ago

@rylax Be sure you used class scrollactive-item on a tag. If you put that class on other child element like li it will fail.

<scrollactive class="my-nav" tag="ul">
   <li>
      <a href="#home" class="scrollactive-item">Home</a>
  </li>
</scrollactive>