Skip to content

Fix error when jQuery is trying to do toLowerCase an empty array. #57

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

Closed
wants to merge 1 commit into from
Closed

Conversation

glrodasz
Copy link

I updated the version of jQuery of an old app. This app have a plugin called jqGrid, and in the method "setCell" is possible pass an Array of properties (attributes) for set them in a cell. The code have a lot of this and the guy who implemented it time ago the code have a lot of empty arrays set. So when jquery-migrate try to do a toLowerCase() of an empty array it throws an error. I don't know if is the best fix but works for me.

@dmethvin
Copy link
Member

An array has never been valid input to .attr() as far as I can tell. Allowing invalid inputs is beyond the scope of what this plugin does, and this patch won't work on all browsers anyway, so I am going to close this. If you can patch the plugin to work that would be great. Perhaps the original author would let you fork and maintain it?

@dmethvin dmethvin closed this Dec 30, 2013
@glrodasz
Copy link
Author

ok, I will try! :D

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

Successfully merging this pull request may close these issues.

2 participants