Skip to content

Commit

Permalink
Merge pull request #54 from Destiner/chineseNY
Browse files Browse the repository at this point in the history
Set accountCreatedCard to false in case web3 is not available
  • Loading branch information
chrismaree committed Jan 29, 2019
2 parents e067611 + 5525fdb commit 25ee4e1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -668,9 +668,10 @@ const store = new Vuex.Store({
let cardInformation = state.cards.filter(card => {
return card.cardIndex === cardIndex.toNumber();
});
let accountCreatedCard =
web3.utils.toChecksumAddress(state.account) ===
web3.utils.toChecksumAddress(gifter); //if the current account created the card
//if the current account created the card
let accountCreatedCard = state.account === null
? false
: web3.utils.toChecksumAddress(state.account) === web3.utils.toChecksumAddress(gifter);

let allCardInformation = {
...{
Expand Down

0 comments on commit 25ee4e1

Please sign in to comment.