Skip to content

Commit

Permalink
fix: add resource null check to sendOffer (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusotterstad authored Jun 28, 2024
1 parent 7789d20 commit 59facfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export class WHIPClient extends EventEmitter {

if (response.ok) {
this.resource = response.headers.get("Location");
if (!this.resource.match(/^http/)) {
if (this.resource && !this.resource.match(/^http/)) {
this.resource = new URL(this.resource, this.whipEndpoint).toString();
}
this.log("WHIP Resource", this.resource);
Expand Down

0 comments on commit 59facfd

Please sign in to comment.