mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 22:37:04 +08:00
refactor(core): add version in worker url (#11614)
Co-authored-by: renovate <29139614+renovate@users.noreply.github.com>
This commit is contained in:
@@ -24,13 +24,15 @@ const cache = createEmotionCache();
|
||||
|
||||
let storeManagerClient: StoreManagerClient;
|
||||
|
||||
const workerUrl = getWorkerUrl('nbstore.worker.js');
|
||||
const workerUrl = getWorkerUrl('nbstore');
|
||||
|
||||
if (
|
||||
window.SharedWorker &&
|
||||
localStorage.getItem('disableSharedWorker') !== 'true'
|
||||
) {
|
||||
const worker = new SharedWorker(workerUrl);
|
||||
const worker = new SharedWorker(workerUrl, {
|
||||
name: 'affine-shared-worker',
|
||||
});
|
||||
storeManagerClient = new StoreManagerClient(new OpClient(worker.port));
|
||||
} else {
|
||||
const worker = new Worker(workerUrl);
|
||||
|
||||
Reference in New Issue
Block a user