Skip to content

Commit

Permalink
fix: the params.customHeaders was not being destructuring correctly t…
Browse files Browse the repository at this point in the history
…he values
  • Loading branch information
DeividVeloso committed Nov 23, 2023
1 parent 6d9e9ca commit d323378
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions packages/js/src/Modules/Verto/webrtc/BaseCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,12 @@ export default abstract class BaseCall implements IWebRTCCall {

this.direction = Direction.Inbound;

this.options = {
...this.options,
customHeaders: [
...(params.customHeaders
? params.customHeaders
: this.options.customHeaders),
],
};
if(params?.customHeaders?.length > 0) {
this.options = {
...this.options,
customHeaders: params.customHeaders
};
}

this.peer = new Peer(PeerType.Answer, this.options);
this._registerPeerEvents();
Expand Down

0 comments on commit d323378

Please sign in to comment.