Skip to content

Comments

Fix @group tag not working with certain IEnumerable types#723

Merged
shps951023 merged 1 commit intomini-software:masterfrom
JamesDSource:master
Feb 7, 2025
Merged

Fix @group tag not working with certain IEnumerable types#723
shps951023 merged 1 commit intomini-software:masterfrom
JamesDSource:master

Conversation

@JamesDSource
Copy link
Contributor

@JamesDSource JamesDSource commented Feb 6, 2025

If the IEnumerable type can't be casted to an IList, such as a List of structs, xRowInfo.CellIlListValues will silently be NULL. To fix, I check if it can be casted to IList first, then create one from CellIEnumerableValues if it can't. Later in generating a template, this issue would have caused a NullReferenceException when parsing the @endgroup tag.

Removed a redundent check for cellValue is IList<object>, because all IList types are IEnumerable.

Added a test for groups that would trigger a NullReferenceException before this patch.

@shps951023 shps951023 merged commit 8136154 into mini-software:master Feb 7, 2025
2 checks passed
@shps951023
Copy link
Member

@JamesDSource Merged 🙌, and e-mail invitation for you, thanks

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