Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Uncaught TypeError: Cannot read property 'split' of undefined #120

Open
serge852 opened this issue Nov 1, 2014 · 2 comments · May be fixed by #135
Open

Uncaught TypeError: Cannot read property 'split' of undefined #120

serge852 opened this issue Nov 1, 2014 · 2 comments · May be fixed by #135

Comments

@serge852
Copy link

serge852 commented Nov 1, 2014

Guess my situation must be sort of uncommon because this issue should have affected everyone but I can't find it reported here.

I kept getting Uncaught TypeError: Cannot read property 'split' of undefined in

getHash: function($link) {
return $link.attr('href').split('#')[1];
},

until changed it to

getHash: function($link) {
return ($link.attr('href'))? $link.attr('href').split('#')[1] : '';
},

My copy of plugin is 2.2 but this function didn't change in the latest code so maybe the error persists.

@davist11
Copy link
Owner

davist11 commented Nov 3, 2014

Do you have a link to your page? Are you correctly linking the nav to the sections?

@typeofweb typeofweb linked a pull request May 9, 2015 that will close this issue
@GauravNegi000
Copy link

Thanks It Worked

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants