An attempt to fix killed web worker on iOS
This commit is contained in:
parent
30121c903c
commit
8baad38a37
@ -31,6 +31,10 @@ export function initApi(onUpdate: OnApiUpdate, initialArgs: ApiInitialArgs) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
worker = new Worker(new URL('./worker.ts', import.meta.url));
|
worker = new Worker(new URL('./worker.ts', import.meta.url));
|
||||||
|
|
||||||
|
// Crazy fix for iOS https://www.youtube.com/watch?v=ViyTYEv9dM8&t=478s
|
||||||
|
(window as any)._workerlol = worker;
|
||||||
|
|
||||||
subscribeToWorker(onUpdate);
|
subscribeToWorker(onUpdate);
|
||||||
|
|
||||||
if (initialArgs.platform === 'iOS') {
|
if (initialArgs.platform === 'iOS') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user