Set default to null / undefined without type
This fixes setting property value to null
or undefined
, for example:
class Foo extends ObservableObject() {
static get props() {
return {
nullProp: { default: null },
undefinedProp: { default: undefined }
};
}
}
var foo = new Foo();
foo.nullProp // -> null
foo.undefinedProp // -> undefined
and
class Foo extends ObservableObject() {
static get props() {
return {
nullProp: null ,
undefinedProp: undefined
};
}
}
var foo = new Foo();
foo.nullProp // -> null
foo.undefinedProp // -> undefined