From 746fea99181456ff49d31038157a8c0a9a12d569 Mon Sep 17 00:00:00 2001 From: Jess Telford Date: Tue, 24 Sep 2024 15:46:13 +1000 Subject: [PATCH] Fix lint errors --- packages/web-worker/src/webpack-parts/loader.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/web-worker/src/webpack-parts/loader.ts b/packages/web-worker/src/webpack-parts/loader.ts index 83f33915ef..fadd4ba38c 100644 --- a/packages/web-worker/src/webpack-parts/loader.ts +++ b/packages/web-worker/src/webpack-parts/loader.ts @@ -78,11 +78,11 @@ export function pitch(this: LoaderContext, 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); @@ -90,7 +90,6 @@ export function pitch(this: LoaderContext, request: string) { } } - if (wrapperContent) { plugin.virtualModules.writeModule( virtualModule,