mirror of
https://github.com/meshcore-dev/meshcore.js.git
synced 2026-04-20 22:13:49 +00:00
fix null check
This commit is contained in:
parent
2588af9a28
commit
25db13cdf6
1 changed files with 1 additions and 3 deletions
|
|
@ -393,15 +393,13 @@
|
|||
if(message.contactMessage){
|
||||
|
||||
// check if from cli contact
|
||||
if(BufferUtils.areBuffersEqual(message.contactMessage.pubKeyPrefix, this.cliContact.publicKey.subarray(0, 6))){
|
||||
if(this.cliContact && BufferUtils.areBuffersEqual(message.contactMessage.pubKeyPrefix, this.cliContact.publicKey.subarray(0, 6))){
|
||||
|
||||
// add remote response
|
||||
this.cliMessages.push({
|
||||
is_incoming: true,
|
||||
text: message.contactMessage.text,
|
||||
});
|
||||
|
||||
console.log("yes");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue