Skip to content

Commit

Permalink
fix stat extractor error (#2208)
Browse files Browse the repository at this point in the history
fixes an issue with statExtractor expecting an async return value
  • Loading branch information
six7 authored Aug 30, 2023
1 parent 1c6e83a commit a141ead
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/app/store/useTokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,11 @@ export default function useTokens() {
track('createVariables');
const createVariableResult = await wrapTransaction({
name: 'createVariables',
statExtractor: (result, transaction) => {
result.then((resolve) => {
transaction.setMeasurement('variables', resolve.totalVariables, '');
});
statExtractor: async (result, transaction) => {
const data = await result;
if (data) {
transaction.setMeasurement('variables', data.totalVariables, '');
}
},
}, async () => await AsyncMessageChannel.ReactInstance.message({
type: AsyncMessageTypes.CREATE_LOCAL_VARIABLES,
Expand Down

0 comments on commit a141ead

Please sign in to comment.