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 12, 2024
1 parent adbecf0 commit 1425f6f
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 1425f6f

Please sign in to comment.