🛠️ Improve error handling for search worker initialization
This commit is contained in:
@@ -659,13 +659,20 @@ const onSearchInput = debounce(async () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize worker if needed
|
// Initialize worker if needed (wait for it to load)
|
||||||
initSearchWorker();
|
try {
|
||||||
|
await initSearchWorker();
|
||||||
|
} catch (error) {
|
||||||
|
console.error('❌ Failed to initialize worker:', error);
|
||||||
|
operationProgress.value.active = false;
|
||||||
|
operationProgress.value.message = 'Worker initialization failed';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!searchWorker) {
|
if (!searchWorker) {
|
||||||
console.error('❌ Worker failed to initialize');
|
console.error('❌ Worker not available');
|
||||||
operationProgress.value.active = false;
|
operationProgress.value.active = false;
|
||||||
operationProgress.value.message = 'Worker failed to initialize';
|
operationProgress.value.message = 'Search worker not available';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user