(app: Vue, options: Options)
| 48 | }); |
| 49 | |
| 50 | const vueInit = (app: Vue, options: Options): void => { |
| 51 | if (DEBUG_BUILD) { |
| 52 | // Check app is not mounted yet - should be mounted _after_ init()! |
| 53 | // This is _somewhat_ private, but in the case that this doesn't exist we simply ignore it |
| 54 | // See: https://github.com/vuejs/core/blob/eb2a83283caa9de0a45881d860a3cbd9d0bdd279/packages/runtime-core/src/component.ts#L394 |
| 55 | const appWithInstance = app as Vue & { |
| 56 | _instance?: { |
| 57 | isMounted?: boolean; |
| 58 | }; |
| 59 | }; |
| 60 | |
| 61 | const isMounted = appWithInstance._instance?.isMounted; |
| 62 | if (isMounted === true) { |
| 63 | consoleSandbox(() => { |
| 64 | // eslint-disable-next-line no-console |
| 65 | console.warn( |
| 66 | '[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.', |
| 67 | ); |
| 68 | }); |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | if (options.attachErrorHandler) { |
| 73 | attachErrorHandler(app, options); |
| 74 | } |
| 75 | |
| 76 | if (hasSpansEnabled(options)) { |
| 77 | app.mixin(createTracingMixins(options.tracingOptions)); |
| 78 | } |
| 79 | }; |
no test coverage detected