mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ui: fix shared worker load
This commit is contained in:
1 parent
e87149fd45
commit
4bf16b2784
2 files changed
+2
-3
No files matched your search
@@ -44,8 +44,7 @@ const endpoint = url.toString().replace('http', 'ws');
|
||||
|
||||
const initWorkerMode = () => {
|
||||
console.log('Messages: using SharedWorker');
|
||||
// @ts-ignore
|
||||
const worker = new SharedWorker('/message-shared-worker.js', { name: 'HydroMessagesWorker' });
|
||||
const worker = new SharedWorker('/messages-shared-worker.js', { name: 'HydroMessagesWorker' });
|
||||
worker.port.start();
|
||||
window.addEventListener('beforeunload', () => {
|
||||
worker.port.postMessage({ type: 'unload' });
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.41.10",
|
||||
"version": "4.41.11",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "index.ts",
|
||||
|
||||
Reference in new issue
Block a user