Skip to content

Commit

Permalink
Update packages/autocomplete-plugin-algolia-insights/src/createAlgoli…
Browse files Browse the repository at this point in the history
…aInsightsPlugin.ts

Co-authored-by: Sarah Dayan <5370675+sarahdayan@users.noreply.github.com>
  • Loading branch information
dhayab and sarahdayan committed Jan 17, 2024
1 parent 2f5a474 commit 08a156c
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,7 @@ export function createAlgoliaInsightsPlugin(
setInsightsContext();

// Handles user token changes
insightsClient('onUserTokenChange', (userToken) => {
setInsightsContext(userToken);
});
insightsClient('onUserTokenChange', setInsightsContext);
insightsClient('getUserToken', null, (_error, userToken) => {
setInsightsContext(userToken);
});
Expand Down

0 comments on commit 08a156c

Please sign in to comment.