@@ -39,8 +39,8 @@ type XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatecha
39
39
40
40
/** JSDoc */
41
41
interface TryCatchOptions {
42
- setInterval : boolean ;
43
42
setTimeout : boolean ;
43
+ setInterval : boolean ;
44
44
requestAnimationFrame : boolean ;
45
45
XMLHttpRequest : boolean ;
46
46
eventTarget : boolean | string [ ] ;
@@ -66,11 +66,11 @@ export class TryCatch implements Integration {
66
66
*/
67
67
public constructor ( options ?: Partial < TryCatchOptions > ) {
68
68
this . _options = {
69
- setInterval : true ,
70
- setTimeout : true ,
71
- requestAnimationFrame : true ,
72
69
XMLHttpRequest : true ,
73
70
eventTarget : true ,
71
+ requestAnimationFrame : true ,
72
+ setInterval : true ,
73
+ setTimeout : true ,
74
74
...options ,
75
75
} ;
76
76
}
@@ -227,12 +227,14 @@ export class TryCatch implements Integration {
227
227
public setupOnce ( ) : void {
228
228
const global = getGlobalObject ( ) ;
229
229
230
- if ( this . _options . setInterval ) {
231
- fill ( global , 'setInterval' , this . _wrapTimeFunction . bind ( this ) ) ;
232
- }
233
230
if ( this . _options . setTimeout ) {
234
231
fill ( global , 'setTimeout' , this . _wrapTimeFunction . bind ( this ) ) ;
235
232
}
233
+
234
+ if ( this . _options . setInterval ) {
235
+ fill ( global , 'setInterval' , this . _wrapTimeFunction . bind ( this ) ) ;
236
+ }
237
+
236
238
if ( this . _options . requestAnimationFrame ) {
237
239
fill ( global , 'requestAnimationFrame' , this . _wrapRAF . bind ( this ) ) ;
238
240
}
0 commit comments