Skip to content

Commit

Permalink
Tweak isPureComputed implementation so it will work with subclasses too
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveSanderson committed Sep 11, 2015
1 parent 49d698d commit d35723b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/subscribables/dependentObservable.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,9 @@ ko.isComputed = function (instance) {
};

ko.isPureComputed = function (instance) {
return ko.hasPrototype(instance, ko.computed) &&
instance.getVersion === pureComputedOverrides.getVersion;
}
return ko.hasPrototype(instance, ko.computed)
&& instance[computedState] && instance[computedState].pure;
};

ko.exportSymbol('computed', ko.computed);
ko.exportSymbol('dependentObservable', ko.computed); // export ko.dependentObservable for backwards compatibility (1.x)
Expand Down

0 comments on commit d35723b

Please sign in to comment.