File tree 1 file changed +5
-8
lines changed
packages/integrations/src
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ const TRACING_GETTER = ({
11
11
12
12
/** Global Vue object limited to the methods/attributes we require */
13
13
interface VueInstance {
14
- config ? : {
14
+ config : {
15
15
errorHandler ?( error : Error , vm ?: ViewModel , info ?: string ) : void ; // tslint:disable-line:completed-docs
16
16
} ;
17
17
mixin ( hooks : { [ key : string ] : ( ) => void } ) : void ; // tslint:disable-line:completed-docs
18
- util : {
18
+ util ? : {
19
19
warn ( ...input : any ) : void ; // tslint:disable-line:completed-docs
20
20
} ;
21
21
}
@@ -338,11 +338,6 @@ export class Vue implements Integration {
338
338
339
339
/** Inject Sentry's handler into owns Vue's error handler */
340
340
private _attachErrorHandler ( getCurrentHub : ( ) => Hub ) : void {
341
- if ( ! this . _options . Vue . config ) {
342
- logger . error ( 'Vue instance is missing required `config` attribute' ) ;
343
- return ;
344
- }
345
-
346
341
const currentErrorHandler = this . _options . Vue . config . errorHandler ; // tslint:disable-line:no-unbound-method
347
342
348
343
this . _options . Vue . config . errorHandler = ( error : Error , vm ?: ViewModel , info ?: string ) : void => {
@@ -379,7 +374,9 @@ export class Vue implements Integration {
379
374
}
380
375
381
376
if ( this . _options . logErrors ) {
382
- this . _options . Vue . util . warn ( `Error in ${ info } : "${ error . toString ( ) } "` , vm ) ;
377
+ if ( this . _options . Vue . util ) {
378
+ this . _options . Vue . util . warn ( `Error in ${ info } : "${ error . toString ( ) } "` , vm ) ;
379
+ }
383
380
console . error ( error ) ; // tslint:disable-line:no-console
384
381
}
385
382
} ;
You can’t perform that action at this time.
0 commit comments