I think it should include null values, since an unset variable is defined by a value of "undefined", so the null might be intentional.

In the current code, if null was excluded, it would then get set to the defaultValue in the next if statement. If the defaultValue was left as null, then the end result is the same. But if the defaultValue was changed to some other value, then excluding null would cause options.value to be set to the custom defaultValue, which is probably not the expected behavior.



On Jul 24, 2013, at 5:11 PM, Phil Freo <notifications@github.com> wrote:

> In src/editor.js:
> 
> > @@ -27,7 +27,7 @@ Form.Editor = Form.editors.Base = Backbone.View.extend({
> >  
> >        this.value = this.model.get(options.key);
> >      }
> > -    else if (options.value) {
> > +    else if (options.value !== undefined) {
> I'm wondering if this should also exclude null values. But obviously false, 0, and '' should work.
> 
> —
> Reply to this email directly or view it on GitHub.