This repository was archived by the owner on Oct 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -49,13 +49,17 @@ extend(Raven.prototype, {
4949
5050 this . raw_dsn = dsn ;
5151 this . dsn = utils . parseDSN ( dsn ) ;
52- this . name = options . name || global . process . env . SENTRY_NAME || require ( 'os' ) . hostname ( ) ;
52+ this . name =
53+ options . name || global . process . env . SENTRY_NAME || require ( 'os' ) . hostname ( ) ;
5354 this . root = options . root || global . process . cwd ( ) ;
5455 this . transport = options . transport || transports [ this . dsn . protocol ] ;
5556 this . sendTimeout = options . sendTimeout || 1 ;
5657 this . release = options . release || global . process . env . SENTRY_RELEASE || '' ;
5758 this . environment =
58- options . environment || global . process . env . SENTRY_ENVIRONMENT || global . process . env . NODE_ENV || '' ;
59+ options . environment ||
60+ global . process . env . SENTRY_ENVIRONMENT ||
61+ global . process . env . NODE_ENV ||
62+ '' ;
5963
6064 // autoBreadcrumbs: true enables all, autoBreadcrumbs: false disables all
6165 // autoBreadcrumbs: { http: true } enables a single type
@@ -385,6 +389,11 @@ extend(Raven.prototype, {
385389 } ,
386390
387391 wrap : function ( options , func ) {
392+ if ( ! this . installed ) {
393+ utils . consoleAlertOnce (
394+ 'Raven has not been installed, therefore no breadcrumbs will be captured. Call `Raven.config(...).install()` to fix this.'
395+ ) ;
396+ }
388397 if ( ! func && typeof options === 'function' ) {
389398 func = options ;
390399 options = { } ;
You can’t perform that action at this time.
0 commit comments