Skip to content

Check if the child object exists, but isn't an object #12

Merged
merged 1 commit into from May 23, 2012

2 participants

@tgriesser

If I have a model like this:

{
   name : 'test user'
   attributes  : ''
}

and I try to do person.set('attributes', { 'k1' : 'v1', 'k2' : 'v2' })

It won't work because attributes isn't undefined but also isn't an object. I updated it to check if the current object is either undefined or not an object to give the placeholder object container.

@powmedia powmedia merged commit c3d370a into powmedia:master May 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.