Skip to content

Commit

Permalink
fix: AbortController is not defined on Node.js (Server Side Render) (#…
Browse files Browse the repository at this point in the history
…3169)

* fix: AbortController is not defined

* use globalThis

Co-authored-by: Antoine du Hamel <[email protected]>

Co-authored-by: Antoine du Hamel <[email protected]>
  • Loading branch information
onhate and aduh95 authored Sep 13, 2021
1 parent 017c21a commit c7e0a5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@uppy/utils/src/AbortController.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Little AbortController proxy module so we can swap out the implementation easily later.
*/
exports.AbortController = AbortController
exports.AbortSignal = AbortSignal
exports.AbortController = globalThis.AbortController
exports.AbortSignal = globalThis.AbortSignal
exports.createAbortError = (message = 'Aborted') => new DOMException(message, 'AbortError')

0 comments on commit c7e0a5a

Please sign in to comment.