fix(tracker): fix peer hack for better build support
This commit is contained in:
parent
a03b441f97
commit
bf80997c0c
1 changed files with 2 additions and 2 deletions
|
|
@ -15,7 +15,7 @@ import type { Options as ConfirmOptions } from './ConfirmWindow/defaults.js';
|
|||
// TODO: fully specified strict check (everywhere)
|
||||
|
||||
//@ts-ignore peerjs hack for webpack5 (?!) TODO: ES/node modules;
|
||||
Peer = Peer.default || Peer;
|
||||
let PeerHack = Peer.default || Peer;
|
||||
|
||||
type StartEndCallback = () => ((()=>{}) | void)
|
||||
|
||||
|
|
@ -244,7 +244,7 @@ export default class Assist {
|
|||
if (this.options.config) {
|
||||
peerOptions['config'] = this.options.config
|
||||
}
|
||||
const peer = this.peer = new Peer(peerID, peerOptions);
|
||||
const peer = this.peer = new PeerHack(peerID, peerOptions);
|
||||
// app.debug.log('Peer created: ', peer)
|
||||
peer.on('error', e => app.debug.warn("Peer error: ", e.type, e))
|
||||
peer.on('disconnect', () => peer.reconnect())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue