Maximum call stack bug fixed

This commit is contained in:
Abdussamed 2023-04-28 23:57:34 +03:00
parent ad3ca3f58b
commit ab2ffecce9
3 changed files with 5 additions and 2 deletions

View File

@ -202,6 +202,7 @@ export default class WebRTC
dt.addEventListener("open",()=>{
this.channel = dt;
WebRTC.channels.set(this.id, this);
this.active = true;
});
dt.addEventListener("message",({data})=>{
let pack = JSON.parse(data);
@ -209,6 +210,7 @@ export default class WebRTC
})
dt.addEventListener("close",()=>{
this.channel = undefined;
this.active = false;
})
}
public destroy()
@ -232,6 +234,7 @@ export default class WebRTC
if(event.channel.label == ':default:'){
WebRTC.channels.set(this.id, this);
this.channel = event.channel;
this.active = true;
event.channel.addEventListener("message",({data})=>{
let pack = JSON.parse(data);
this.emit('input', pack);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long