diff --git a/package.json b/package.json index e6edddf..50d6db5 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/src/Experiment.jsx b/src/Experiment.jsx index 7047eda..5175465 100644 --- a/src/Experiment.jsx +++ b/src/Experiment.jsx @@ -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; } diff --git a/src/emitter.jsx b/src/emitter.jsx index 8c20327..1586672 100644 --- a/src/emitter.jsx +++ b/src/emitter.jsx @@ -32,6 +32,7 @@ PushtellEventEmitter.prototype._emitPlay = function(experimentName, variantName) }; PushtellEventEmitter.prototype._resetPlayedExperiments = function(){ + values = {}; playedExperiments = {}; }