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

IE8 isEmptyObject return true for string #1694

Closed
DioNNiS opened this issue Oct 10, 2014 · 4 comments
Closed

IE8 isEmptyObject return true for string #1694

DioNNiS opened this issue Oct 10, 2014 · 4 comments

Comments

@DioNNiS
Copy link

DioNNiS commented Oct 10, 2014

In IE8- $.isEmptyObject('bugaga'); returns true.
In all other browsers - false.

jQuery 1.11.1

@rwaldron
Copy link
Member

That would've failed the unit tests: https://github.com/jquery/jquery/blob/1.x-master/test/unit/core.js#L314

@rwaldron
Copy link
Member

Nevermind, I was looking at the wrong tests for entirely the wrong function.

@rwaldron
Copy link
Member

From the docs:

The argument should always be a plain JavaScript Object as other types of object (DOM elements, primitive strings/numbers, host objects) may not give consistent results across browsers.

@dmethvin
Copy link
Member

I was just going to post that! 👍

@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

3 participants