Uncaught TypeError: Cannot call method 'split' of undefined

If tag < a > not have attribute "href", has error:
 Uncaught TypeError: Cannot call method 'split' of undefined