Skip to content

Commit 4adef34

Browse files
author
Riccardo Cipolleschi
committed
Restore object with prerelease as string to unblock 0.72
1 parent fecfd04 commit 4adef34

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/react-native/Libraries/Core/ReactNativeVersionCheck.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ exports.checkVersions = function checkVersions(): void {
3939
}
4040
};
4141

42+
// Note: in OSS, the prerelease version is usually 0.Y.0-rc.W, so it is a string and not a number
43+
// Then we need to keep supporting that object shape.
4244
function _formatVersion(
43-
version: (typeof Platform)['constants']['reactNativeVersion'],
45+
version:
46+
| (typeof Platform)['constants']['reactNativeVersion']
47+
| {major: number, minor: number, patch: number, prerelease: ?string},
4448
): string {
4549
return (
4650
`${version.major}.${version.minor}.${version.patch}` +

0 commit comments

Comments
 (0)