elabs/serenade.js — Issue #18: Model.set blows up if a null value is present
Author: stereosteve
Created: 2012-02-10 15:21:11+00:00
State: open

I had a JSON object from the rails server with a null value in it. Calling Model.set(data) would die inside of Serenade.Properties._defer. undefined works fine, it is only null that causes the problem.

For instance:

data = {first: 'John', middle: null, last: 'Doe'}
person = Serenade.Model.find(0)
person.set(data)

Cheers!