File tree Expand file tree Collapse file tree 2 files changed +22
-20
lines changed Expand file tree Collapse file tree 2 files changed +22
-20
lines changed Original file line number Diff line number Diff line change 1
1
/*globals require, self, window */
2
2
"use strict"
3
3
4
- const ac = require ( "." )
4
+ const ac = require ( "./dist/abort-controller " )
5
5
6
- /*eslint-disable no-shadow, @mysticatea/prettier */
7
- const global =
8
- typeof window !== "undefined" ? window :
6
+ /*eslint-disable @mysticatea/prettier */
7
+ const g =
9
8
typeof self !== "undefined" ? self :
9
+ typeof window !== "undefined" ? window :
10
+ typeof global !== "undefined" ? global :
10
11
/* otherwise */ undefined
11
- /*eslint-enable no-shadow, @mysticatea/prettier */
12
+ /*eslint-enable @mysticatea/prettier */
12
13
13
- if ( global ) {
14
- if ( typeof global . AbortController === "undefined" ) {
15
- global . AbortController = ac . AbortController
14
+ if ( g ) {
15
+ if ( typeof g . AbortController === "undefined" ) {
16
+ g . AbortController = ac . AbortController
16
17
}
17
- if ( typeof global . AbortSignal === "undefined" ) {
18
- global . AbortSignal = ac . AbortSignal
18
+ if ( typeof g . AbortSignal === "undefined" ) {
19
+ g . AbortSignal = ac . AbortSignal
19
20
}
20
21
}
Original file line number Diff line number Diff line change 1
1
/*globals self, window */
2
- import * as ac from "."
2
+ import * as ac from "./dist/abort-controller "
3
3
4
- /*eslint-disable no-shadow, @mysticatea/prettier */
5
- const global =
6
- typeof window !== "undefined" ? window :
4
+ /*eslint-disable @mysticatea/prettier */
5
+ const g =
7
6
typeof self !== "undefined" ? self :
7
+ typeof window !== "undefined" ? window :
8
+ typeof global !== "undefined" ? global :
8
9
/* otherwise */ undefined
9
- /*eslint-enable no-shadow, @mysticatea/prettier */
10
+ /*eslint-enable @mysticatea/prettier */
10
11
11
- if ( global ) {
12
- if ( typeof global . AbortController === "undefined" ) {
13
- global . AbortController = ac . AbortController
12
+ if ( g ) {
13
+ if ( typeof g . AbortController === "undefined" ) {
14
+ g . AbortController = ac . AbortController
14
15
}
15
- if ( typeof global . AbortSignal === "undefined" ) {
16
- global . AbortSignal = ac . AbortSignal
16
+ if ( typeof g . AbortSignal === "undefined" ) {
17
+ g . AbortSignal = ac . AbortSignal
17
18
}
18
19
}
You can’t perform that action at this time.
0 commit comments