Skip to content

fix(vue): Merge default and manual hooks while creating mixins. #4132

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

Merged
merged 4 commits into from
Nov 8, 2021

Conversation

onurtemizkan
Copy link
Collaborator

Fixes: #3936

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2021

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 22.45 KB (+0.01% 🔺)
@sentry/browser - Webpack 23.35 KB (0%)
@sentry/react - Webpack 23.38 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 29.89 KB (+0.01% 🔺)

@@ -47,8 +48,7 @@ function finishRootSpan(vm: VueSentry, timestamp: number, timeout: number): void
}

export const createTracingMixins = (options: TracingOptions): Mixins => {
const { hooks } = options;

const hooks = new Set((options.hooks || []).concat(DEFAULT_HOOKS));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't use Set unfortunately because we support IE10

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops 😅 , updated.

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@AbhiPrasad AbhiPrasad enabled auto-merge (squash) November 8, 2021 21:19
@AbhiPrasad AbhiPrasad merged commit 8ca6da8 into master Nov 8, 2021
@AbhiPrasad AbhiPrasad deleted the onur/vue-tracing-merge-hooks branch November 8, 2021 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge default options when using manual initialization in @sentry/vue
2 participants