Skip to content

Conversation

@AndrewEastwood
Copy link

We really need this because when the val is null then condition returns true (because of typeof null == 'object'), and the both function returns null value which is set to offset variable. Later we have the following line #118 attr[key] += offset[pos] || 0; and as the offset is null we get error message (totally sad face goes here).

We really need this because when the `val` is `null` then condition returns `true` (because of `typeof null == 'object'`), and the `both` function returns `null` value which is set to `offset` variable. Later we have the following line flesler#118 `attr[key] += offset[pos] || 0;` and as the `offset` is `null` we get error message (totally sad face goes here).
@flesler flesler closed this in 025405d Nov 20, 2014
@flesler
Copy link
Owner

flesler commented Nov 20, 2014

I changed it to use jQuery.isPlainObject() just because that's what I expected the code to do.
You didn't actually explain what's the case where val can be null and why it should be "legal" though.

@AndrewEastwood
Copy link
Author

the isPlainObject just works great! thanks!

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