elabs/serenade.js — pull request #22 by stereosteve (2012-02-18 19:31:24+00:00)
Title: Fixes Model.set if there are null values present

When running in the browser, the following code will fail:

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

This works server side when running in node, but fails in the browser. Adding an extra null check seems to fix it. Was unable to replicate in node, so there are no jasmine tests to go along with it, but this small change seemed to fix the problem for me.

Cheers,
Steve