We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d12a8b2 commit ec15b99Copy full SHA for ec15b99
src/main/hooks/usePyodideWorker.ts
@@ -17,15 +17,17 @@ export const useManagedWorker = () => {
17
}
18
};
19
20
- initWorker();
+ if (workerUuid === null) {
21
+ void initWorker();
22
+ }
23
24
return () => {
25
if (workerUuid) {
26
dispatch(terminateWorker(workerUuid));
27
28
isActive = false;
29
- }, [dispatch]);
30
+ }, [dispatch, workerUuid]);
31
32
return workerUuid;
33
0 commit comments