mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Bugfix: Cannot write a value to a ko.computed unless you specify a 'write' option
This commit is contained in:
parent
e52316bb08
commit
ac2238a23f
4 changed files with 54 additions and 50 deletions
|
|
@ -471,6 +471,7 @@ var protoProp = ko.observable.protoProperty; // == "__ko_proto__"
|
|||
computedFn[protoProp] = ko.computed;
|
||||
|
||||
ko.exportSymbol('computed', ko.computed);
|
||||
ko.exportSymbol('isComputed', instance => (typeof instance == 'function' && instance[protoProp] === computedFn[protoProp]));
|
||||
ko.exportSymbol('computed.fn', computedFn);
|
||||
ko.exportProperty(computedFn, 'dispose', computedFn.dispose);
|
||||
|
||||
|
|
@ -482,3 +483,4 @@ ko.pureComputed = (evaluatorFunctionOrOptions) => {
|
|||
evaluatorFunctionOrOptions['pure'] = true;
|
||||
return ko.computed(evaluatorFunctionOrOptions);
|
||||
};
|
||||
ko.exportSymbol('pureComputed', ko.pureComputed);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue