Skip to content

Commit

Permalink
Added case for when net imported
Browse files Browse the repository at this point in the history
  • Loading branch information
duart38 committed Aug 26, 2020
1 parent 84a2cf4 commit 6dee25c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Thread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export default class Thread<T> {
this.imports = imports || [];
this.fileName = this.createFile();
this.populateFile(operation);
this.worker = new Worker(new URL(this.fileName, import.meta.url).href, {
let workerURL = new URL(this.fileName, import.meta.url);

this.worker = new Worker(workerURL.href.startsWith("http") ? "file:"+workerURL.pathname : workerURL.href, {
type: "module",
deno,
});
Expand Down

0 comments on commit 6dee25c

Please sign in to comment.