Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
darcyadams committed Mar 25, 2015
1 parent 1de551e commit c841e86
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
14 changes: 10 additions & 4 deletions dist/delorean.js
@@ -1,4 +1,4 @@
/*! delorean - v0.8.7 - 2015-02-24 */
/*! delorean - v0.8.7 - 2015-03-24 */
(function (DeLorean) {
'use strict';

Expand Down Expand Up @@ -285,7 +285,7 @@

if (typeof definition.calculate === 'function') {
this.state[__generateOriginalName(key)] = value;
this.state[key] = definition.calculate.call(this.state, value);
this.state[key] = definition.calculate.call(this, value);
}
} else {
// Scheme **must** include the key you wanted to set.
Expand Down Expand Up @@ -365,7 +365,7 @@
}

this.state[__generateOriginalName(keyName)] = definition.default;
this.state[keyName] = definition.calculate.call(this.state, definition.default);
this.state[keyName] = definition.calculate.call(this, definition.default);
changedProps.push(keyName);
}
}
Expand All @@ -392,7 +392,7 @@
}
// Calculate this value
definition = scheme[dep];
this.state[dep] = definition.calculate.call(this.state,
this.state[dep] = definition.calculate.call(this,
this.state[__generateOriginalName(dep)] || definition.default);

// Make sure this does not get calculated again in this change batch
Expand All @@ -415,6 +415,12 @@
return this;
};

Store.prototype.resetState = function () {
this.buildScheme();
this.listener.emit('change');
return this;
};

// Stores must have a `actions` hash of `actionName: methodName`
// `methodName` is the `this.store`'s prototype method..
Store.prototype.bindActions = function () {
Expand Down

0 comments on commit c841e86

Please sign in to comment.