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

each error #1669

Closed
rambo-panda opened this issue Sep 30, 2014 · 1 comment
Closed

each error #1669

rambo-panda opened this issue Sep 30, 2014 · 1 comment

Comments

@rambo-panda
Copy link

$.each('rrrrrrr',function(){});

The method should be verified for the parameters;
eg:

if(/\[object Object\]|\[object Array\]/.test(Object.prototype.toString.call(params))){
//todosomething
}
@markelog
Copy link
Member

jQuery.each is documented to accept only Array or Object arguments - http://api.jquery.com/jQuery.each/.

Anything else is in "undefined behaviour" domain.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants