Skip to content

Commit

Permalink
Ensure osVersion is in semver format
Browse files Browse the repository at this point in the history
  • Loading branch information
paullinator authored and Jon-edge committed Jan 11, 2024
1 parent 0249047 commit be6d2bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/ui4/PromoCardsUi4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ export const PromoCardsUi4 = (props: Props) => {
// Check for PromoCard2 from info server:
React.useEffect(() => {
const osType = Platform.OS.toLowerCase()
const osVersion = DeviceInfo.getSystemVersion()
const osVersionRaw = DeviceInfo.getSystemVersion()
const version = getVersion()
const osVersion = Array.from({ length: 3 }, (_, i) => osVersionRaw.split('.')[i] || '0').join('.')

fetchInfo(`v1/inforollup/${config.appId ?? 'edge'}?os=${osType}&osVersion=${osVersion}&appVersion=${version}`)
.then(async res => {
Expand Down

0 comments on commit be6d2bf

Please sign in to comment.