Skip to content

return early if falling back to setTimeout for MessageChannel#528

Merged
brianshen1990 merged 1 commit intomainfrom
return-early-if-falling-back-to-`setTimeout`-for-MessageChannel
Feb 5, 2025
Merged

return early if falling back to setTimeout for MessageChannel#528
brianshen1990 merged 1 commit intomainfrom
return-early-if-falling-back-to-`setTimeout`-for-MessageChannel

Conversation

@brianshen1990
Copy link
Contributor

@brianshen1990 brianshen1990 commented Feb 3, 2025

In this PR, we've corrected an issue where the fallback to setTimeout in the BatchingRemoteConnection did not properly halt further execution, attempting to use the constructor even when MessageChannel was not available.

This error particularly impacted tests run in a jsdom environment. Now, we ensure an early return if MessageChannel is unavailable to prevent this issue

@brianshen1990
Copy link
Contributor Author

/snapit

1 similar comment
@brianshen1990
Copy link
Contributor Author

/snapit

@brianshen1990 brianshen1990 force-pushed the return-early-if-falling-back-to-`setTimeout`-for-MessageChannel branch from 31c583c to 900b84f Compare February 3, 2025 18:34
@brianshen1990
Copy link
Contributor Author

/snapit

@shopify-github-actions-access
Copy link
Contributor

🫰✨ Thanks @brianshen1990! Your snapshot has been published to npm.

Test the snapshot by updating your package.json with the newly published version:

"@remote-dom/core": "0.0.0-snapshot-20250203183857"

@brianshen1990 brianshen1990 force-pushed the return-early-if-falling-back-to-`setTimeout`-for-MessageChannel branch from 900b84f to 5fa56c6 Compare February 4, 2025 14:46
@brianshen1990 brianshen1990 self-assigned this Feb 4, 2025
@brianshen1990 brianshen1990 marked this pull request as ready for review February 4, 2025 14:51
@brianshen1990 brianshen1990 force-pushed the return-early-if-falling-back-to-`setTimeout`-for-MessageChannel branch from 5fa56c6 to df294ab Compare February 4, 2025 15:26
@brianshen1990 brianshen1990 merged commit a842bdb into main Feb 5, 2025
6 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.

3 participants