vercel / speed-insights

Vercel Speed Insights package
https://vercel.com/docs/speed-insights
Apache License 2.0
54 stars 6 forks source link

Cannot read properties of undefined (reading 'route') #34

Closed elvinn closed 5 months ago

elvinn commented 6 months ago

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.

feugy commented 5 months ago

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

feugy commented 5 months ago

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