component / reactive

Tiny reactive template engine
382 stars 48 forks source link

Don't lose falsy values in model #150

Closed yanatan16 closed 10 years ago

yanatan16 commented 10 years ago

Falsy values such as 0, '', and null are able to be .set() onto a view/adapter, but not .get() (returns undefined). These two commits allow such values to be returned from .get().

defunctzombie commented 10 years ago

Tests so we don't break this in the future plz.

yanatan16 commented 10 years ago

@defunctzombie Just added tests. Had to update another one that used false as an undefined-like value to use undefined proper.

That would be a breaking change. Anyone who uses false or 0 or '' to represent a nil value to pass-through to delegate will break. They should change those to undefined.