mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 14:07:04 +03:00
Added: knockout.js observable toJSON()
This commit is contained in:
parent
3a315bc543
commit
36fa52307f
3 changed files with 10 additions and 2 deletions
|
|
@ -37,6 +37,10 @@ ko.observable = initialValue => {
|
|||
|
||||
// Define prototype for observables
|
||||
var observableFn = {
|
||||
'toJSON': function() {
|
||||
let value = this[observableLatestValue];
|
||||
return value.toJSON ? value.toJSON() : value;
|
||||
},
|
||||
'equalityComparer': valuesArePrimitiveAndEqual,
|
||||
peek: function() { return this[observableLatestValue]; },
|
||||
valueHasMutated: function () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue