Skip to content

Commit

Permalink
Merge pull request #376 from hkirat/fix-#3
Browse files Browse the repository at this point in the history
Added optional chaining to validate peer's rectTransport, Closes #3
  • Loading branch information
benawad authored Feb 23, 2021
2 parents 3d22dde + 9c31f32 commit 3df9602
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shawarma/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ async function main() {
if (theirPeerId === myPeerId) {
continue;
}
const peerTransport = state[theirPeerId].recvTransport;
const peerTransport = state[theirPeerId]?.recvTransport;
if (!peerTransport) {
continue;
}
Expand Down

0 comments on commit 3df9602

Please sign in to comment.