File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
packages/ember/addon/instance-initializers Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import ApplicationInstance from '@ember/application/instance';
22import Ember from 'ember' ;
33import { run , _backburner , scheduleOnce } from '@ember/runloop' ;
44import * as Sentry from '@sentry/browser' ;
5+ import { ExtendedBackburner } from "@sentry/ember/runloop" ;
56import { Span , Transaction , Integration } from '@sentry/types' ;
67import { EmberRunQueues } from '@ember/runloop/-private/types' ;
78import { getActiveTransaction } from '..' ;
@@ -28,11 +29,19 @@ export function initialize(appInstance: ApplicationInstance): void {
2829 }
2930}
3031
31- function getBackburner ( ) {
32+ function getBackburner ( ) : Pick < ExtendedBackburner , "on" | "off" > {
33+ if ( _backburner ) {
34+ return _backburner ;
35+ }
36+
3237 if ( run . backburner ) {
3338 return run . backburner ;
3439 }
35- return _backburner ;
40+
41+ return {
42+ on ( ) { } ,
43+ off ( ) { }
44+ }
3645}
3746
3847function getTransitionInformation ( transition : any , router : any ) {
You can’t perform that action at this time.
0 commit comments