Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: don't error when calling
#sendHaves
without a peer (#691)
We were effectively doing something like this: ```javascript if (!object) { console.warn('no object', object.propertyAccessThatWillFail) } ``` This could throw an error because we can't access properties on `null` or `undefined`.[^0] This updates the log message to avoid this error. [^0]: It's possible that the value was another falsy value, such as `false`, where you can technically access properties. I still think this change is an improvement in that situation, because `false.remotePublicKey` is `undefined`, which isn't very useful.
- Loading branch information