Skip to content

Commit

Permalink
Added optional chaining, Closes #3
Browse files Browse the repository at this point in the history
  • Loading branch information
hkirat committed Feb 23, 2021
1 parent 3d22dde commit 9c31f32
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 9c31f32

Please sign in to comment.