Skip to content

Conversation

@teameh
Copy link
Contributor

@teameh teameh commented May 28, 2025

I think #339 and #319 could be caused by users using a preferredItemSize that is invalid. Either containing a width or height that is 0 or .nan

I encountered this when I debugged a crash:

image

The code in my app that calculated the preferred item size contained a bug, resulting in a .nan as the width. I think it would be good to safeguard this so at least the SwiftUIPager does not crash when this happens.

@teameh
Copy link
Contributor Author

teameh commented May 28, 2025

Added logging with os_log for compatibility

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.

1 participant