Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jesstelford authored Sep 24, 2024
1 parent 4638287 commit 746fea9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/web-worker/src/webpack-parts/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,18 @@ export function pitch(this: LoaderContext<Options>, request: string) {
wrapperContent = cachedContent;
} else if (cachedContent == null) {
try {
if (this.fs?.readFileSync) {
if (this.fs?.readFileSync) {
wrapperContent = this.fs.readFileSync(wrapperModule).toString();
moduleWrapperCache.set(wrapperModule, wrapperContent ?? false);
} else {
throw new Error("readFileSync is undefined");
throw new Error('readFileSync is undefined');
}
} catch (error) {
moduleWrapperCache.set(wrapperModule, false);
}
}
}


if (wrapperContent) {
plugin.virtualModules.writeModule(
virtualModule,
Expand Down

0 comments on commit 746fea9

Please sign in to comment.