Skip to content
This repository has been archived by the owner on Oct 11, 2021. It is now read-only.

Coin with no ImageUrl results in undefined error #7

Open
haghdk opened this issue Feb 20, 2018 · 1 comment
Open

Coin with no ImageUrl results in undefined error #7

haghdk opened this issue Feb 20, 2018 · 1 comment

Comments

@haghdk
Copy link

haghdk commented Feb 20, 2018

When calling getCoinImage: function(symbol) {} it will return an undefined error when it try to find an image for a coin with no ImageUrl in the cryptocompare API, which breaks the app.

I fixed it with

 try {

          return CRYPTOCOMPARE_URI + this.coinData[symbol].ImageUrl

        } catch(err) {
            console.log(err)
        }
@haghdk haghdk changed the title NANO coin image fetch results in undefined error Coin with no ImageUrl results in undefined error Feb 20, 2018
@cmoleka
Copy link
Contributor

cmoleka commented May 11, 2018

Hey, can you explain how the fix code fit?

EDIT: Figured it out :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants