Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function tagName not on JQuery object causing "Cannot read property 'toLowerCase' of undefined" #334

Open
DarkSnowy opened this issue Oct 10, 2017 · 0 comments

Comments

@DarkSnowy
Copy link

DarkSnowy commented Oct 10, 2017

Form.Element function getValue is throwing
"VM43674 prototype.js:6476 Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
at getValue (VM43674 prototype.js:6476)
at Object.insert (VM43675 insertLink.js:11)
at InsertLink (selectLink.aspx:44)
at :1:2"

Prototype.js build version 1.7.3

This is due to wrapping the element in a JQuery object and then trying to directly access a property of the element.
Removing the JQuery wrapper fixed it for me but you may want to use element.prop("tagName").toLowerCase();. If you take the src in that direction then be wary that many of the functions the element are passed into will not expect a JQuery object and will also throw errors.

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

No branches or pull requests

1 participant