diff --git a/src/app/core/market/api/bid/bid.service.ts b/src/app/core/market/api/bid/bid.service.ts index 9a134ca48..dd8572679 100644 --- a/src/app/core/market/api/bid/bid.service.ts +++ b/src/app/core/market/api/bid/bid.service.ts @@ -31,11 +31,13 @@ export class BidService { // bid for item await this.market.call('bid', ['send', listing.hash, profile.id, addressId]).toPromise() .catch((error) => { - error = error.error ? error.error.error : error; - if (error.includes('unspent')) { - error = errorType.unspent; - } else if (error.includes('broke')) { - error = errorType.broke; + if (error) { + error = error.error ? error.error.error : error; + if (error.includes('unspent')) { + error = errorType.unspent; + } else if (error.includes('broke')) { + error = errorType.broke; + } } throw error; });