yarn react-native-view-shot 5.0.1
v5.0.1

7 hours ago

Patch release fixing an Android crash that hit users capturing GL / SurfaceView / TextureView roots directly.

What changed

  • fix(android) Guard applyTransformations against NullPointerException and ClassCastException when the captured view is itself a non-ViewGroup (e.g. a SurfaceView captured directly with handleGLSurfaceView: true). The original parent walk ran past root and either dereferenced a null parent or tried to cast a ViewRootImpl to View. The walk is now extracted into a walkAncestors helper that short-circuits when child == root, stops on null, and stops on non-View ViewParent. Closes #488. (#631)
  • test(android) First JUnit + Mockito unit tests for the library, wired into the existing build-android CI job via ./gradlew :react-native-view-shot:testDebugUnitTest. Covers the three failure modes plus happy paths. (#631)

Contributors

Full changelog: v5.0.0...v5.0.1

Don't miss a new react-native-view-shot release

NewReleases is sending notifications on new releases.