From 1df51e29681efa14a40f0fcc8fff137501be03e1 Mon Sep 17 00:00:00 2001 From: Andrew <66942330+Noro95@users.noreply.github.com> Date: Sun, 15 Sep 2024 20:40:19 +0200 Subject: [PATCH] var replacement string is always defined --- src/backend/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/utils.ts b/src/backend/utils.ts index bd678f7b80..59f3891bc8 100644 --- a/src/backend/utils.ts +++ b/src/backend/utils.ts @@ -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