Fix x$(window) behaviour on Safari 5.1. #60

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@edufelipe

On release 2.3.0 there is a bug caused by the fact that window objects in Safari define a numeric length of 0.

Because of the testing order xui calls slice(window), which in turn returned an empty array and breaks the code.

This patch just inverts the testing order and everything works.

@edufelipe edufelipe Fix `x$(window)` behaviour on Safari 5.1.
`window` objects in Safari define a numeric length of 0, causing `slice(window)` to
be called, which in turn returned an empty array.

This little issue caused `x$(window)` to be the same as `x$()`.
49431c4
@filmaj
xui member

Looks like this is also happening in Chrome 15. I'm going to merge your fix in but also try to add a test for this as well.

@filmaj filmaj added a commit that referenced this pull request Nov 18, 2011
@filmaj filmaj Adding a test for issue #60 41e4dd0
@filmaj
xui member

I've merged this in @ 3c9fcad. Also added a test for this @ 41e4dd0.

Thank you for your contribution!

P.S. added you to the contributor list @edufelipe :)

@filmaj filmaj closed this Nov 18, 2011
@edufelipe

Thanks a lot @filmaj!

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