From c7e0a5a88392d96302da8309e55b6b28fd44a025 Mon Sep 17 00:00:00 2001 From: Marcelo Luiz Onhate Date: Mon, 13 Sep 2021 09:55:10 -0300 Subject: [PATCH] fix: AbortController is not defined on Node.js (Server Side Render) (#3169) * fix: AbortController is not defined * use globalThis Co-authored-by: Antoine du Hamel Co-authored-by: Antoine du Hamel --- packages/@uppy/utils/src/AbortController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@uppy/utils/src/AbortController.js b/packages/@uppy/utils/src/AbortController.js index 5d228469a2..9aaf0423ff 100644 --- a/packages/@uppy/utils/src/AbortController.js +++ b/packages/@uppy/utils/src/AbortController.js @@ -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')