JSON.stringify(m.prop(x)) use x.toJSON method when possible
When JSON serializing m.prop, check if wrapped object does define toJSON method and if so, return it's result.
This commit is contained in:
parent
42b21a5950
commit
c71e8f4fcb
2 changed files with 17 additions and 0 deletions
|
|
@ -1331,6 +1331,7 @@
|
|||
}
|
||||
|
||||
prop.toJSON = function () {
|
||||
if (store && isFunction(store.toJSON)) return store.toJSON()
|
||||
return store
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue