Skip to content

Commit

Permalink
feat: add sessionPersister to config
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Janvier committed Sep 2, 2020
1 parent ae6fb53 commit 8b8651d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
} from './main';
import { SplitTest } from './splitTest';
import { uiFactory } from './ui';
import { UserSessionPersister } from './userSessionPersister';

const ui = uiFactory(
testsObservable,
Expand Down Expand Up @@ -47,6 +48,7 @@ export {
reset,
ui,
SplitTest,
UserSessionPersister,
};

export default {
Expand Down
3 changes: 3 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export function config(userConfig: Partial<Config> = {}) {
if (userConfig.onVariationChange) {
_config.onVariationChange = userConfig.onVariationChange;
}
if (userConfig.sessionPersister) {
_config.sessionPersister = userConfig.sessionPersister;
}
}

/**
Expand Down

0 comments on commit 8b8651d

Please sign in to comment.