Skip to content

Commit

Permalink
Pull active variant from emitter rather than localStorage. 1.5.0 rele…
Browse files Browse the repository at this point in the history
…ase. Fixes #6.
  • Loading branch information
wehriam committed Feb 5, 2016
1 parent c888953 commit 0a48796
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"A/B test"
],
"main": "index.js",
"version": "1.4.3",
"version": "1.5.0",
"description": "A/B testing React components and debug tools. Isomorphic with a simple, universal interface. Well documented and lightweight. Tested in popular browsers and Node.js. Includes helpers for Mixpanel and Segment.com.",
"directories": {
"test": "test"
Expand Down
2 changes: 1 addition & 1 deletion src/Experiment.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default React.createClass({
emitter.emitWin(this.props.name);
},
getLocalStorageValue() {
const activeValue = emitter.getActiveVariant();
const activeValue = emitter.getActiveVariant(this.props.name);
if(typeof activeValue === "string") {
return activeValue;
}
Expand Down
1 change: 1 addition & 0 deletions src/emitter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ PushtellEventEmitter.prototype._emitPlay = function(experimentName, variantName)
};

PushtellEventEmitter.prototype._resetPlayedExperiments = function(){
values = {};
playedExperiments = {};
}

Expand Down

0 comments on commit 0a48796

Please sign in to comment.