dhruvaray / backbone-associations

Create object hierarchies with Backbone models; Respond to hierarchy changes using regular Backbone events.
http://dhruvaray.github.io/backbone-associations/
MIT License
492 stars 75 forks source link

Check if val is null/undefined in get() #139

Closed chiplay closed 10 years ago

chiplay commented 10 years ago

Not actually sure how the cache is working - but this is my best guess at how to check for null/undefined, to preserve '0' values returned from the ModelProto.get.call()

chiplay commented 10 years ago

@dhruvaray as a side note - the latest trunk seems to break a few things on our app - I'm guessing a side effect of our use of bb mutators and bb stickit and the new cached values. I'll investigate soon and report back.

dhruvaray commented 10 years ago

My apologies for the inordinate delay :( Been caught up with a pile of other work.

Fixed via 8b4a41f378a5f753191f401eea25740f1979803f & 33d4d554e13b4a3c2bb9a5c8dae65c0635403299

Let me know if this works for you.

dhruvaray commented 10 years ago

Closed as these commits cover the fixes you made + in some other places