Skip to content

Commit

Permalink
var replacement string is always defined
Browse files Browse the repository at this point in the history
  • Loading branch information
norowachi authored Sep 15, 2024
1 parent 147ed1e commit 1df51e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -580,9 +580,9 @@ function constructAndUpdateRPC(
const client = makeClient(appId)
const versionText = `Heroic ${app.getVersion()}`

const replaceVariables = (str?: string) =>
const replaceVariables = (str: string) =>
str
?.replace(/{game}/gi, gameInfo.title)
.replace(/{game}/gi, gameInfo.title)
.replace(/{platform}/gi, getFormattedOsName())

const image = gameInfo.art_icon || gameInfo.art_square
Expand Down

0 comments on commit 1df51e2

Please sign in to comment.