From 56a3f1d8c8944f499cd65772a7dd5e3935009c8d Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Sun, 7 Jul 2024 14:59:12 +0700 Subject: [PATCH] Bug fixes --- src/modules/patcher.ts | 2 +- src/utils/global.ts | 2 +- src/utils/network.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/patcher.ts b/src/modules/patcher.ts index 45fe441..18da2de 100644 --- a/src/modules/patcher.ts +++ b/src/modules/patcher.ts @@ -189,7 +189,7 @@ if (!!window.BX_REMOTE_PLAY_CONFIG) { }, enableXcloudLogger(str: string) { - const text = 'this.telemetryProvider=e}log(e,t,i){'; + const text = 'this.telemetryProvider=e}log(e,t,r){'; if (!str.includes(text)) { return false; } diff --git a/src/utils/global.ts b/src/utils/global.ts index bac8099..a7c8f1e 100644 --- a/src/utils/global.ts +++ b/src/utils/global.ts @@ -42,7 +42,7 @@ export function deepClone(obj: any): any { } if (!obj) { - return obj; + return {}; } return JSON.parse(JSON.stringify(obj)); diff --git a/src/utils/network.ts b/src/utils/network.ts index a953ad9..0c0460c 100644 --- a/src/utils/network.ts +++ b/src/utils/network.ts @@ -446,7 +446,7 @@ class XcloudInterceptor { let overrideMkb: boolean | null = null; - if (getPref(PrefKey.NATIVE_MKB_ENABLED) === 'on' || BX_FLAGS.ForceNativeMkbTitles?.includes(STATES.currentStream.titleInfo!.details.productId)) { + if (getPref(PrefKey.NATIVE_MKB_ENABLED) === 'on' || (STATES.currentStream.titleInfo && BX_FLAGS.ForceNativeMkbTitles?.includes(STATES.currentStream.titleInfo.details.productId))) { overrideMkb = true; }