mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-12-18 20:04:17 +01:00
lint and build fix
This commit is contained in:
parent
db15821d37
commit
6c2c79e119
@ -201,7 +201,7 @@ export const useCompareChangeNavigation = (
|
||||
});
|
||||
};
|
||||
|
||||
let nodes = findNodes();
|
||||
const nodes = findNodes();
|
||||
if (nodes.length > 0) {
|
||||
proceedWithNodes(nodes);
|
||||
return;
|
||||
|
||||
@ -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<CompareParameters> {
|
||||
@ -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;
|
||||
}, []);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user