Skip to content

Commit faf038b

Browse files
authored
fix: Vue breadcrumb recording missing in payload (getsentry#2099)
* fix: Vue breadcrumb recording missing in payload * fix: wat * fix: Remove timeout
1 parent 18a12ba commit faf038b

File tree

1 file changed

+5
-5
lines changed
  • packages/integrations/src

1 file changed

+5
-5
lines changed

packages/integrations/src/vue.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ export class Vue implements Integration {
8787
}
8888

8989
if (getCurrentHub().getIntegration(Vue)) {
90-
getCurrentHub().withScope(scope => {
91-
Object.keys(metadata).forEach(key => {
92-
scope.setExtra(key, metadata[key]);
90+
// This timeout makes sure that any breadcrumbs are recorded before sending it off the sentry
91+
setTimeout(() => {
92+
getCurrentHub().withScope(scope => {
93+
scope.setContext('vue', metadata);
94+
getCurrentHub().captureException(error);
9395
});
94-
95-
getCurrentHub().captureException(error);
9696
});
9797
}
9898

0 commit comments

Comments
 (0)