es6-features
es6-features copied to clipboard
Fix uncaught type error on clicking lexical this
Thank you for nice documents about ES6 features.
I found a slight issue on clicking 'Lexical this' in side menu, please see the following image.

When 'Lexical this' link is clicked, the ev.target
does not contain <a>
tag element, but <code>
tag element under <a>
tag. And <code>
tag does not have href
attribute, so error is occurred.
I fixed this issue by using $(this)
instead of $(ev.target)
. Also the argument ev
is not used, so I removed it.