-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(vue): Cast name parameter to string #4483
fix(vue): Cast name parameter to string #4483
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of changing the types for all the transactions, let's just fix this for Vue for now!
Can we change
name: to.name || to.path, |
name: to.name || (to.matched[0] && to.matched[0].path) || to.path, |
That's a much more elegant solution lol. Updated to reflect your changes, I also found one more usage in and fixed it there |
@@ -37,7 +37,7 @@ function getBackburner() { | |||
|
|||
function getTransitionInformation(transition: any, router: any) { | |||
const fromRoute = transition?.from?.name; | |||
const toRoute = transition && transition.to ? transition.to.name : router.currentRouteName; | |||
const toRoute = transition && transition.to ? transition.to.name.toString() : router.currentRouteName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s avoid changing ember for now since the router should always return a string? We can come back to this later on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you for your contribution!
This won't be part of the next release as it is in progress (getsentry/publish#779), but it'll be part of the release after that (6.17.5
or 6.18.0
)
Any idea how long until that release? I really want to use this feature of Sentry but I can't until then |
We can try to cut another patch release soon then! |
Hey, once getsentry/publish#798 gets merged in, this will be available in Edit: Shipped! https://www.npmjs.com/package/@sentry/vue/v/6.17.5 |
There was an issue here, as |
@JoseOrtiz Good catch, will open a PR to fix! |
Ref: #4483 `to.name` can be undefined, so we should guard against it
Opened PR to address this: #4530, will cut a patch release right afterwards! |
Ref: #4483 `to.name` can be undefined, so we should guard against it
@JoseOrtiz fix will be released with |
hey @AbhiPrasad - I think this PR has another issue. |
This is still occurring with the fix in #4530 @snoozbuster? That PR should mean we always check to PRs are welcome if we need to introduce additional guards. |
Before submitting a pull request, please take a look at our
Contributing guidelines and verify:
yarn lint
) & (yarn test
).Solves #4482