Skip to content

Commit

Permalink
Added observable._getValue().
Browse files Browse the repository at this point in the history
An way for (internal) Methods to get the value with out beeing registered
by the Observer. For cases where you need the observable value but don't
want to get updated if it changes (In my case the update function of the options
data-query)
  • Loading branch information
Joscha Rohmann committed Nov 3, 2015
1 parent ba2a9aa commit 43a3fc6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/query/observable.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ define([
observable._elementKeys = {};
observable._elements = [];

observable._getValue = function () {
return getObservableValue(observable);
};

if (blocks.isArray(initialValue)) {
blocks.extend(observable, blocks.observable.fn.array);
observable._indexes = [];
Expand Down

0 comments on commit 43a3fc6

Please sign in to comment.