Skip to content

Commit

Permalink
Merge pull request #168 from hengkx/master
Browse files Browse the repository at this point in the history
fix: android choose invoice
  • Loading branch information
little-snow-fox authored Oct 27, 2021
2 parents 1425924 + 96c7bce commit 32e5978
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,12 @@ export function chooseInvoice(data = {}) {
if (resp.errCode === 0) {
if (Platform.OS === 'android') {
const cardItemList = JSON.parse(resp.cardItemList);
resp.cards = cardItemList.map((item) => ({
cardId: item.card_id,
encryptCode: item.encrypt_code,
}));
resp.cards = cardItemList
? cardItemList.map((item) => ({
cardId: item.card_id,
encryptCode: item.encrypt_code,
}))
: [];
}
resolve(resp);
} else {
Expand Down

0 comments on commit 32e5978

Please sign in to comment.