Skip to content

Commit

Permalink
update race function to validate options
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedElbohoty committed Sep 3, 2024
1 parent 82c356b commit e277709
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/race.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ export async function race(
typeof container === 'string' ? document.querySelector<HTMLElement>(container) : container;
if (!root) throw new Error('Container element is not found.');

const config = validateOptions(options);
const validOptions = validateOptions(options);

const store = createStore(rootReducer);
store.dispatch(actions.container.setContainer({ element: root }));
store.dispatch(actions.options.loadOptions(options));
store.dispatch(actions.options.loadOptions(validOptions));
const ticker = createTicker(store);
let preparedData = await prepareData(data, store);
let renderer = createRenderer(preparedData, store, root);
Expand Down

0 comments on commit e277709

Please sign in to comment.