Skip to content

[0.71.0] Provides aspectRatio conditionally cause js crash #35858

Description

@mym0404

Description

Provides aspectRatio conditionally cause js crash

It seems to related with #34629

 <VideoPlayer
key={video.id}
style={{
flex: 1,
aspectRatio: !isFullScreen ? 16 / 9 : undefined,
maxWidth: videoMaxWidth,
}}

Version

0.71.0

Output of npx react-native info

System:
OS: macOS 12.6
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 166.05 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.13.0 - /usr/local/bin/node
Yarn: 1.22.19 - ~/.yarn/bin/yarn
npm: 8.1.0 - /usr/local/bin/npm
Watchman: 2023.01.02.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK:
API Levels: 23, 27, 28, 29, 30, 31, 32, 33
Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3, 31.0.0, 33.0.0
System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom, android-32 | Google APIs Intel x86 Atom_64, android-33 | Google APIs Intel x86 Atom_64, android-33 | Google Play Intel x86 Atom_64
Android NDK: 23.0.7344513-beta4
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9014738
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.14 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0 react-native: 0.71.0 => 0.71.0 react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found

Steps to reproduce

<MyViewstyle={{flex: 1,aspectRatio: !isFullScreen ? 16/9 : undefined,maxWidth: videoMaxWidth,}}

Snack, code example, screenshot, or link to a repository

The description is obvious

Sample Repository

Video

1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions