Merge pull request #1 from nogamenofun98/nogamenofun98-patch-1

Changed how the _config in AssistManager construct
This commit is contained in:
NoGameNoFun 2021-12-29 09:33:51 +08:00 committed by GitHub
commit 543384496f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,12 +147,13 @@ export default class AssistManager {
return;
}
this.setStatus(ConnectionStatus.Connecting)
const urlObject = new URL(window.ENV.API_EDP)
import('peerjs').then(({ default: Peer }) => {
const _config = {
// @ts-ignore
host: new URL(window.ENV.API_EDP).host,
host: urlObject.hostname,
path: '/assist',
port: location.protocol === 'https:' ? 443 : 80,
port: urlObject.port === "" ? location.protocol === 'https:' ? 443 : 80 : urlObject.port,
}
if (this.config) {