File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
packages/browser/src/integrations Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,10 @@ const DEFAULT_EVENT_TARGET = [
37
37
38
38
type XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatechange' ;
39
39
40
+ /** JSDoc */
40
41
interface TryCatchOptions {
41
- setTimeout : boolean ;
42
42
setInterval : boolean ;
43
+ setTimeout : boolean ;
43
44
requestAnimationFrame : boolean ;
44
45
XMLHttpRequest : boolean ;
45
46
eventTarget : boolean | string [ ] ;
@@ -65,8 +66,8 @@ export class TryCatch implements Integration {
65
66
*/
66
67
public constructor ( options ?: Partial < TryCatchOptions > ) {
67
68
this . _options = {
68
- setTimeout : true ,
69
69
setInterval : true ,
70
+ setTimeout : true ,
70
71
requestAnimationFrame : true ,
71
72
XMLHttpRequest : true ,
72
73
eventTarget : true ,
@@ -226,12 +227,12 @@ export class TryCatch implements Integration {
226
227
public setupOnce ( ) : void {
227
228
const global = getGlobalObject ( ) ;
228
229
229
- if ( this . _options . setTimeout ) {
230
- fill ( global , 'setTimeout' , this . _wrapTimeFunction . bind ( this ) ) ;
231
- }
232
230
if ( this . _options . setInterval ) {
233
231
fill ( global , 'setInterval' , this . _wrapTimeFunction . bind ( this ) ) ;
234
232
}
233
+ if ( this . _options . setTimeout ) {
234
+ fill ( global , 'setTimeout' , this . _wrapTimeFunction . bind ( this ) ) ;
235
+ }
235
236
if ( this . _options . requestAnimationFrame ) {
236
237
fill ( global , 'requestAnimationFrame' , this . _wrapRAF . bind ( this ) ) ;
237
238
}
You can’t perform that action at this time.
0 commit comments