Skip to content

Commit

Permalink
only delete when found
Browse files Browse the repository at this point in the history
  • Loading branch information
silkroadnomad committed Apr 1, 2024
1 parent 7a8e4ef commit b2cb1c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/network/p2p-operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ export const requestAddress = async (_scannedAddress,nopingpong, onBoardingToken
const all = await _dbMyAddressBook.all()

const foundDummy = all.filter((it) => { return it.value.owner === scannedAddress })
await _dbMyAddressBook.del(foundDummy[0].key)
if(foundDummy.length>0) await _dbMyAddressBook.del(foundDummy[0].key)
// if(foundDummy.length===0){
const dummyContact = {
owner: scannedAddress,
Expand Down

0 comments on commit b2cb1c4

Please sign in to comment.