Skip to content

Commit

Permalink
fix: web worker only http request
Browse files Browse the repository at this point in the history
  • Loading branch information
qq15725 committed Apr 14, 2023
1 parent 2b14d8e commit 77714aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function contextFetch(context: Context, options: ContextFetchOptions) {
}

request.response = (
workers.length
rawUrl.startsWith('http') && workers.length
? new Promise((resolve, reject) => {
const worker = workers[requests.size & (workers.length - 1)]
worker.postMessage({ rawUrl, ...baseFetchOptions })
Expand Down

1 comment on commit 77714aa

@vercel
Copy link

@vercel vercel bot commented on 77714aa Apr 14, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

modern-screenshot – ./

modern-screenshot-qq15725.vercel.app
modern-screenshot.vercel.app
modern-screenshot-git-main-qq15725.vercel.app

Please sign in to comment.