Skip to content

fix(core): Corrected fetch module DOMException reference#11262

Merged
CatchABus merged 1 commit into
NativeScript:mainfrom
dangrima90:fix/core-fetch-abort-exports-reference
Jun 8, 2026
Merged

fix(core): Corrected fetch module DOMException reference#11262
CatchABus merged 1 commit into
NativeScript:mainfrom
dangrima90:fix/core-fetch-abort-exports-reference

Conversation

@dangrima90
Copy link
Copy Markdown
Contributor

PR Checklist

What is the current behavior?

In @nativescript/core/fetch/index.mjs signal.aborted and xhr.onabort are both still referencing exports.DOMException which seems to be the old CommonJS pattern. From my tests, without the change any fetch / axios CancelToken / AbortController cancellation will trigger ReferenceError: exports is not defined at xhr.onabort.

What is the new behavior?

Updated @nativescript/core/fetch/index.mjs so that DOMException is referenced correctly. Rather than using exports.DOMException code now simply uses DOMException.

Fixes/Implements/Closes #11238.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Jun 8, 2026

View your CI Pipeline Execution ↗ for commit 5366f10

Command Status Duration Result
nx test apps-automated -c=android ✅ Succeeded 4m 7s View ↗
nx run-many --target=test --configuration=ci --... ✅ Succeeded 3s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-06-08 05:45:34 UTC

@CatchABus CatchABus changed the title fix(android): Update @nativescript/core fetch to use exported DOMException fix(core): Corrected fetch module DOMException reference Jun 8, 2026
@CatchABus CatchABus merged commit 3d8e5e0 into NativeScript:main Jun 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When making use of axios CancelToken, ReferenceError: exports is not defined at xhr.onabort error occurs

3 participants