Skip to content

Commit

Permalink
Update packages/vite/src/node/plugins/worker.ts
Browse files Browse the repository at this point in the history
Co-authored-by: 翠 / green <green@sapphi.red>
  • Loading branch information
fi3ework and sapphi-red committed Mar 15, 2023
1 parent 7201a46 commit aadb0f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin {
let objURL;
try {
objURL = blob && (window.URL || window.webkitURL).createObjectURL(blob);
if (objURL) throw ''
if (!objURL) throw ''
return new ${workerConstructor}(objURL)
} catch(e) {
return new ${workerConstructor}("data:application/javascript;base64," + encodedJs${workerOptions});
Expand Down

0 comments on commit aadb0f2

Please sign in to comment.