Browse Source

Fix using test mode

master
Eduard Kuzmenko 2 years ago
parent
commit
220483f00f
  1. 2
      src/components/appNavigationController.ts
  2. 9
      src/helpers/setWorkerProxy.ts

2
src/components/appNavigationController.ts

@ -237,7 +237,7 @@ export class AppNavigationController {
public replaceState() { public replaceState() {
this.debug && this.log.warn('replace'); this.debug && this.log.warn('replace');
const url = location.origin + location.pathname + this.overriddenHash; const url = location.origin + location.pathname + location.search + this.overriddenHash;
history.replaceState(this.id, '', url); history.replaceState(this.id, '', url);
} }

9
src/helpers/setWorkerProxy.ts

@ -15,8 +15,13 @@ export default function setWorkerProxy() {
} }
}; };
const workerProxy = new Proxy(Worker, workerHandler); [
Worker = workerProxy; Worker,
typeof(SharedWorker) !== 'undefined' && SharedWorker
].forEach((w) => {
if(!w) return;
window[w.name as any] = new Proxy(w, workerHandler);
});
} }
setWorkerProxy(); setWorkerProxy();

Loading…
Cancel
Save