Skip to content

Commit

Permalink
Merge pull request #89 from CryptoScamDB/bf-address_coin
Browse files Browse the repository at this point in the history
Added property check to fix runtime error
  • Loading branch information
409H authored Jul 22, 2019
2 parents d6fd7ed + 29d4465 commit 4870276
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ export const readEntries = async (): Promise<void> => {
if (
!entry.addresses ||
!(address.coin in entry.addresses) ||
!(address.address in entry.adresses[address.coin])
!(
entry.hasOwnProperty(address.coin) &&
address.address in entry.adresses[address.coin]
)
) {
await run(
'DELETE FROM addresses WHERE address=? AND coin=? AND entry=?',
Expand Down

0 comments on commit 4870276

Please sign in to comment.