Skip to content

Commit

Permalink
[feat-684] changed logic for getVersionName
Browse files Browse the repository at this point in the history
  • Loading branch information
silentrald committed Jan 4, 2025
1 parent 41d76e1 commit c2f9139
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/shared/helpers/bs-version.helpers.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { BSVersion } from "shared/bs-version.interface";

export function getVersionName(version: BSVersion) {
let { name } = version;
if (!name) {
name = version.steam
? "Steam" : "Oculus";
if (version.steam) {
return `${version.BSVersion} - Steam`;
}
return `${version.BSVersion} - ${name}`;

if (version.oculus) {
return `${version.BSVersion} - Oculus`;
}

const { name } = version;
return name ? `${version.BSVersion} - ${name}` : version.BSVersion;
}

0 comments on commit c2f9139

Please sign in to comment.