Skip to content

utilities.dart: Check if sub_cards exists before accessing its length#39

Merged
dangfan merged 1 commit into
nfcim:masterfrom
sztsian:combinedCard
Feb 27, 2026
Merged

utilities.dart: Check if sub_cards exists before accessing its length#39
dangfan merged 1 commit into
nfcim:masterfrom
sztsian:combinedCard

Conversation

@sztsian

@sztsian sztsian commented Feb 27, 2026

Copy link
Copy Markdown
Collaborator

Data of v2.4.0 does not have sub_cards in its card data. In such situation if user upgrade the app to version with multi-card support without cleaning its old data, a red error page will show up instead of card data. And the only way for user to continue to use nfsee would be clean all existing data, which is not good.

With this patch, we check if the sub_cards exists before trying to display card info. As a result, users can have a better upgrade experience.

Data of v2.4.0 does not have sub_cards in its card data. In such
situation if user upgrade the app to version with multi-card support
without cleaning its old data, a red error page will show up instead of
card data. And the only way for user to continue to use nfsee would be
clean all existing data, which is not good.

With this patch, we check if the sub_cards exists before trying to
display card info. As a result, users can have a better upgrade
experience.

Signed-off-by: Zamir SUN <sztsian@gmail.com>
@dangfan dangfan merged commit 91297c4 into nfcim:master Feb 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants