Skip to content

Commit 5ba072a

Browse files
javachefacebook-github-bot
authored andcommitted
Fix require cycle
Summary: `AbortController` requires `AbortSignal` which requires `AbortController` Changelog: [Internal] Differential Revision: D118818763
1 parent c300f84 commit 5ba072a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/react-native/src/private/webapis/dom/abort-api/AbortController.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
// flowlint unsafe-getters-setters:off
3131

32-
import {AbortSignal, abortSignal, createAbortSignal} from './AbortSignal';
32+
import type {AbortSignal} from './AbortSignal';
3333

3434
const SIGNAL_KEY: symbol = Symbol('aborted');
3535

@@ -47,7 +47,7 @@ export class AbortController {
4747

4848
constructor() {
4949
// $FlowExpectedError[prop-missing]
50-
this[SIGNAL_KEY] = createAbortSignal();
50+
this[SIGNAL_KEY] = require('./AbortSignal').createAbortSignal();
5151
}
5252

5353
/**
@@ -61,7 +61,7 @@ export class AbortController {
6161
* Abort and signal to any observers that the associated activity is to be aborted.
6262
*/
6363
abort(reason: unknown): void {
64-
abortSignal(reason, getSignal(this));
64+
require('./AbortSignal').abortSignal(reason, getSignal(this));
6565
}
6666
}
6767

0 commit comments

Comments
 (0)