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

Fix for Issue #163 (jsDump treats any object with a length property as an array) #164

Merged
merged 2 commits into from
Oct 10, 2011
Merged

Conversation

trevorparscal
Copy link
Contributor

@trevorparscal trevorparscal commented Oct 7, 2011

Added more strict array type detection for dump output, and allowed NodeList objects to be output as arrays

This helps prevent treating any object with a length property as an array, while maintaining the ability to render NodeList objects as arrays. jsDump output tests still pass after this patch is applied.

Fixes #163.

…odeList objects to be output as arrays

This helps prevent treating any object with a length property as an
array, while maintaining the ability to render NodeList objects as
arrays. jsDump output tests still pass after this patch is applied.
This doesn't have any functional difference because we are comparing a
string literal with the results of Object.toString(), but it's better
to be sure that they are the same type.
@jzaefferer jzaefferer merged commit efd8177 into qunitjs:master Oct 10, 2011
@jzaefferer
Copy link
Member

Thanks, landed! Refactored slighlty to take advantage of a toString alias from another commit: a99a1f9

@jzaefferer
Copy link
Member

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

Successfully merging this pull request may close these issues.

jsDump treats any object with a length property as an array
3 participants