Skip to content

Commit

Permalink
Added property check to fix runtime error
Browse files Browse the repository at this point in the history
  • Loading branch information
409H committed Jul 22, 2019
1 parent d6fd7ed commit 29d4465
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 29d4465

Please sign in to comment.