make getter-setters json-serializable
This commit is contained in:
parent
0aba8aa4bd
commit
cb6994dd93
9 changed files with 49 additions and 14 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue