File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
packages/integrations/src Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ const TRACING_GETTER = ({
1111
1212/** Global Vue object limited to the methods/attributes we require */
1313interface VueInstance {
14- config ? : {
14+ config : {
1515 errorHandler ?( error : Error , vm ?: ViewModel , info ?: string ) : void ; // tslint:disable-line:completed-docs
1616 } ;
1717 mixin ( hooks : { [ key : string ] : ( ) => void } ) : void ; // tslint:disable-line:completed-docs
18- util : {
18+ util ? : {
1919 warn ( ...input : any ) : void ; // tslint:disable-line:completed-docs
2020 } ;
2121}
@@ -338,11 +338,6 @@ export class Vue implements Integration {
338338
339339 /** Inject Sentry's handler into owns Vue's error handler */
340340 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-
346341 const currentErrorHandler = this . _options . Vue . config . errorHandler ; // tslint:disable-line:no-unbound-method
347342
348343 this . _options . Vue . config . errorHandler = ( error : Error , vm ?: ViewModel , info ?: string ) : void => {
@@ -379,7 +374,9 @@ export class Vue implements Integration {
379374 }
380375
381376 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+ }
383380 console . error ( error ) ; // tslint:disable-line:no-console
384381 }
385382 } ;
You can’t perform that action at this time.
0 commit comments