mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-10-30 17:13:36 +03:00
Cleanup calls to Knockout observableArray
Improved Knockout observableArray
This commit is contained in:
parent
fa5476e486
commit
b6f0b634fb
47 changed files with 251 additions and 276 deletions
|
|
@ -24,14 +24,7 @@ ko.observable = initialValue => {
|
|||
observable[observableLatestValue] = initialValue;
|
||||
|
||||
Object.defineProperty(observable, length, {
|
||||
get: () => length in observable[observableLatestValue] ? observable[observableLatestValue][length] : undefined,
|
||||
set: function(value) {
|
||||
if (length in observable[observableLatestValue]) {
|
||||
this.valueWillMutate();
|
||||
observable[observableLatestValue][length] = value;
|
||||
this.valueHasMutated();
|
||||
}
|
||||
}
|
||||
get: () => null == observable[observableLatestValue] ? undefined : observable[observableLatestValue][length]
|
||||
});
|
||||
|
||||
// Inherit from 'subscribable'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue