vercel/speed-insights

Cannot read properties of undefined (reading 'route')

elvinn opened this issue · 2 comments

elvinn commented

According to Doc - Speed Insights
,I should use injectSpeedInsights(); to init in other framework.

image

However, it will throw an error like below:

image image

Solution: should I use injectSpeedInsights({}); instead of injectSpeedInsights(); ? In the source code, props is not optional, otherwise it will throw an error when execute props.router.

Hello @elvinn , thank you for the but report.
This is a duplicate of #32, let's continue the discussion there.

@elvinn version 1.0.3 contains a fix and will be available within a few minutes.