make getter-setters json-serializable

This commit is contained in:
Leo Horie 2014-04-19 22:22:02 -04:00
parent 0aba8aa4bd
commit cb6994dd93
9 changed files with 49 additions and 14 deletions

View file

@ -319,14 +319,14 @@ Mithril = m = new function app(window) {
//model
m.prop = function(store) {
var f = function() {
var prop = function() {
if (arguments.length) store = arguments[0]
return store
}
f.toJSON = function() {
prop.toJSON = function() {
return store
}
return f
return prop
}
m.deferred = function() {