Skip to content

Comments

Fixing defaults to use httpAdapter if available (#1285)#9

Open
MitchLewis930 wants to merge 1 commit intopr_029_beforefrom
pr_029_after
Open

Fixing defaults to use httpAdapter if available (#1285)#9
MitchLewis930 wants to merge 1 commit intopr_029_beforefrom
pr_029_after

Conversation

@MitchLewis930
Copy link

PR_029

* Fixing defaults to use httpAdapter if available
* Use a safer, cross-platform method to detect the Node environment
@MitchLewis930 MitchLewis930 requested a review from Copilot January 31, 2026 00:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reorders the adapter detection logic in getDefaultAdapter() to prioritize the HTTP adapter for Node.js environments over the XHR adapter for browsers, while adding a more robust check to identify genuine Node.js processes.

Changes:

  • Swapped the order of adapter detection, checking for Node.js environment first before browser environment
  • Added a more specific Node.js detection using Object.prototype.toString.call(process) === '[object process]' to avoid false positives

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.

1 participant