Knockout simplify Object.setPrototypeOf

This commit is contained in:
the-djmaze 2023-03-06 11:05:44 +01:00
parent b7963ebfa0
commit 4dbcade830
5 changed files with 42 additions and 60 deletions

View file

@ -29,9 +29,7 @@ ko.observable = initialValue => {
ko.subscribable['fn'].init(observable);
// Inherit from 'observable'
Object.setPrototypeOf(observable, observableFn);
return observable;
return Object.setPrototypeOf(observable, observableFn);
}
// Define prototype for observables