Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tracing): Better guarding for performance observer (#8872)
This removes a type cast for the performance observer and actually adds some guards to make sure we do not run into cases where a property we expect to exist does not exist. It seems we sometimes ran into cases where `nextHopProtocol` would be `undefined`, not a string, leading to https://github.com/getsentry/sentry-javascript/blob/develop/packages/tracing-internal/src/browser/request.ts#L202 failing. I now specifically check for the existence of this property, as well as also adding a default for all the time based stuff (0) to ensure these also work in the case one of the fields does not exist (instead of checking for existence of all of them). Closes #8870 Closes #8863
- Loading branch information