Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: error when vast only contains only one ad #18

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

Lunkers
Copy link
Collaborator

@Lunkers Lunkers commented Feb 5, 2025

handles the case where a VAST response only contains one ad, which would previously lead to errors due to Array.reduce() not being a valid function

@Lunkers Lunkers linked an issue Feb 5, 2025 that may be closed by this pull request
@Lunkers Lunkers requested a review from birme February 5, 2025 07:25
@Lunkers Lunkers linked an issue Feb 5, 2025 that may be closed by this pull request
Copy link
Contributor

@birme birme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, another option would be to use the isArray() hook and always return an array for this specific path, see https://github.com/NaturalIntelligence/fast-xml-parser/blob/HEAD/docs/v4/2.XMLparseOptions.md#isarray

@Lunkers
Copy link
Collaborator Author

Lunkers commented Feb 5, 2025

I think that option will be a cleaner solution. Gonna look into it.

@Lunkers Lunkers force-pushed the 14-some-mismatches-in-the-transcoded-assets branch from 7e42766 to ae93410 Compare February 5, 2025 07:58
@birme birme merged commit be1c4bd into main Feb 5, 2025
4 checks passed
@birme birme deleted the 14-some-mismatches-in-the-transcoded-assets branch February 5, 2025 08:41
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.

Crashes when parsing or building (some) VAST Some mismatches in the transcoded assets
2 participants