Skip to content

vm.$options is undefined when attaching props from Vue component #5277

Closed
@Arinono

Description

@Arinono

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/vue

SDK Version

7.2.0

Framework Version

2.6.14

Link to Sentry event

https://sentry.io/organizations/withthegrid/issues/3357123868/?project=242657&query=is%3Aunresolved

Steps to Reproduce

Very similar to #5204, I don't know exactly how, but with attachProps enabled the errorHandler looks for propsData in vm.$options, which is undefined in this case.

if (vm && options.attachProps) {
// Vue2 - $options.propsData
// Vue3 - $props
metadata.propsData = vm.$options.propsData || vm.$props;
}

Expected Result

To not have sentry erroring

Actual Result

I get an uncaught error thrown by the SDK landing in my Sentry dashboard


I should have changed the types here in my previous fix #5254 :

This way I would have seen a TS error in the errorHandler

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions