From 6c2c79e11923e51d245146bdf56bf8de5abcccf6 Mon Sep 17 00:00:00 2001 From: EthanHealy01 Date: Fri, 7 Nov 2025 11:03:02 +0000 Subject: [PATCH] lint and build fix --- .../tools/compare/hooks/useCompareChangeNavigation.ts | 2 +- .../src/core/hooks/tools/compare/useCompareOperation.ts | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/src/core/components/tools/compare/hooks/useCompareChangeNavigation.ts b/frontend/src/core/components/tools/compare/hooks/useCompareChangeNavigation.ts index 089283fab..f137581e8 100644 --- a/frontend/src/core/components/tools/compare/hooks/useCompareChangeNavigation.ts +++ b/frontend/src/core/components/tools/compare/hooks/useCompareChangeNavigation.ts @@ -201,7 +201,7 @@ export const useCompareChangeNavigation = ( }); }; - let nodes = findNodes(); + const nodes = findNodes(); if (nodes.length > 0) { proceedWithNodes(nodes); return; diff --git a/frontend/src/core/hooks/tools/compare/useCompareOperation.ts b/frontend/src/core/hooks/tools/compare/useCompareOperation.ts index 5e56a6a13..0dd3706f0 100644 --- a/frontend/src/core/hooks/tools/compare/useCompareOperation.ts +++ b/frontend/src/core/hooks/tools/compare/useCompareOperation.ts @@ -24,6 +24,7 @@ import { } from '@app/hooks/tools/compare/operationUtils'; import { alert, dismissToast } from '@app/components/toast'; import type { ToastLocation } from '@app/components/toast/types'; +import CompareWorkerCtor from '@app/workers/compareWorker?worker'; const LONG_RUNNING_PAGE_THRESHOLD = 2000; export interface CompareOperationHook extends ToolOperationHook { @@ -57,10 +58,7 @@ export const useCompareOperation = (): CompareOperationHook => { const ensureWorker = useCallback(() => { if (!workerRef.current) { - workerRef.current = new Worker( - new URL('../../../workers/compareWorker.ts', import.meta.url), - { type: 'module' } - ); + workerRef.current = new CompareWorkerCtor(); } return workerRef.current; }, []);