mirror of
https://github.com/gamer-ai/eletypes-frontend.git
synced 2024-11-25 16:36:34 +08:00
fix web worker
This commit is contained in:
parent
a68f7ca1c1
commit
1a4e7d0ca8
19
package-lock.json
generated
19
package-lock.json
generated
@ -5518,9 +5518,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001331",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001331.tgz",
|
||||
"integrity": "sha512-Y1xk6paHpUXKP/P6YjQv1xqyTbgAP05ycHBcRdQjTcyXlWol868sJJPlmk5ylOekw2BrucWes5jk+LvVd7WZ5Q==",
|
||||
"version": "1.0.30001651",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz",
|
||||
"integrity": "sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
@ -5529,8 +5529,13 @@
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
]
|
||||
],
|
||||
"license": "CC-BY-4.0"
|
||||
},
|
||||
"node_modules/case-sensitive-paths-webpack-plugin": {
|
||||
"version": "2.4.0",
|
||||
@ -20738,9 +20743,9 @@
|
||||
}
|
||||
},
|
||||
"caniuse-lite": {
|
||||
"version": "1.0.30001331",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001331.tgz",
|
||||
"integrity": "sha512-Y1xk6paHpUXKP/P6YjQv1xqyTbgAP05ycHBcRdQjTcyXlWol868sJJPlmk5ylOekw2BrucWes5jk+LvVd7WZ5Q=="
|
||||
"version": "1.0.30001651",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz",
|
||||
"integrity": "sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg=="
|
||||
},
|
||||
"case-sensitive-paths-webpack-plugin": {
|
||||
"version": "2.4.0",
|
||||
|
@ -414,7 +414,7 @@ const TypeBox = ({
|
||||
|
||||
useEffect(() => {
|
||||
// Initialize worker
|
||||
wpmWorkerRef.current = WorkerBuilder(calculateWpmWorker);
|
||||
wpmWorkerRef.current = new WorkerBuilder(calculateWpmWorker);
|
||||
|
||||
return () => {
|
||||
// Cleanup worker on component unmount
|
||||
@ -588,7 +588,7 @@ const TypeBox = ({
|
||||
const workerRef = useRef(null);
|
||||
|
||||
useEffect(() => {
|
||||
workerRef.current = WorkerBuilder(checkPrevWorker);
|
||||
workerRef.current = new WorkerBuilder(checkPrevWorker);
|
||||
|
||||
return () => {
|
||||
if (workerRef.current) {
|
||||
|
Loading…
Reference in New Issue
Block a user