Skip to content

Commit

Permalink
chore: no hack
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricbet committed Dec 18, 2024
1 parent 193f18f commit 1dcce23
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
15 changes: 7 additions & 8 deletions src/vs/base/common/worker/simpleWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -570,14 +570,13 @@ export class SimpleWorkerServer implements IWorkerServer {
}

const url = FileAccess.asBrowserUri(`${moduleId}.js` as AppResourcePath).toString(true);
console.log("🚀 ~ SimpleWorkerServer ~ initialize ~ url:", url)
// return import(`${url}`).then((module: { create: IRequestHandlerFactory }) => {
// this._requestHandler = module.create(this);

// if (!this._requestHandler) {
// throw new Error(`No RequestHandler!`);
// }
// });
return import(`${url}`).then((module: { create: IRequestHandlerFactory }) => {
this._requestHandler = module.create(this);

if (!this._requestHandler) {
throw new Error(`No RequestHandler!`);
}
});
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/vs/editor/common/services/editorSimpleWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,7 @@ export class EditorSimpleWorker extends BaseEditorSimpleWorker {
};

const url = FileAccess.asBrowserUri(`${moduleId}.js` as AppResourcePath).toString(true);
console.log("🚀 ~ EditorSimpleWorker ~ returnnewPromise ~ url:", url)
// import(`${url}`).then(onModuleCallback).catch(reject);
import(`${url}`).then(onModuleCallback).catch(reject);
});
}

Expand Down

0 comments on commit 1dcce23

Please sign in to comment.