jQuery-One-Page-Nav icon indicating copy to clipboard operation
jQuery-One-Page-Nav copied to clipboard

Uncaught TypeError: Cannot read property 'split' of undefined

Open serge852 opened this issue 9 years ago • 2 comments

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.

serge852 avatar Nov 01 '14 00:11 serge852