Skip to content

Commit 0ab6f81

Browse files
committed
X is before e, sure
1 parent a062703 commit 0ab6f81

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

packages/browser/src/integrations/trycatch.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ type XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatecha
3939

4040
/** JSDoc */
4141
interface TryCatchOptions {
42-
setInterval: boolean;
4342
setTimeout: boolean;
43+
setInterval: boolean;
4444
requestAnimationFrame: boolean;
4545
XMLHttpRequest: boolean;
4646
eventTarget: boolean | string[];
@@ -66,11 +66,11 @@ export class TryCatch implements Integration {
6666
*/
6767
public constructor(options?: Partial<TryCatchOptions>) {
6868
this._options = {
69-
setInterval: true,
70-
setTimeout: true,
71-
requestAnimationFrame: true,
7269
XMLHttpRequest: true,
7370
eventTarget: true,
71+
requestAnimationFrame: true,
72+
setInterval: true,
73+
setTimeout: true,
7474
...options,
7575
};
7676
}
@@ -227,12 +227,14 @@ export class TryCatch implements Integration {
227227
public setupOnce(): void {
228228
const global = getGlobalObject();
229229

230-
if (this._options.setInterval) {
231-
fill(global, 'setInterval', this._wrapTimeFunction.bind(this));
232-
}
233230
if (this._options.setTimeout) {
234231
fill(global, 'setTimeout', this._wrapTimeFunction.bind(this));
235232
}
233+
234+
if (this._options.setInterval) {
235+
fill(global, 'setInterval', this._wrapTimeFunction.bind(this));
236+
}
237+
236238
if (this._options.requestAnimationFrame) {
237239
fill(global, 'requestAnimationFrame', this._wrapRAF.bind(this));
238240
}

0 commit comments

Comments
 (0)