From 61261973824341870321aeb91e25656bda6e87a0 Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Thu, 21 Nov 2024 19:31:48 +0000 Subject: [PATCH] fix: check for release prior to using it \#607 --- .../server/mqttUpdater/handlers/persistGameReleaseState.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/playnite-web/src/server/mqttUpdater/handlers/persistGameReleaseState.ts b/apps/playnite-web/src/server/mqttUpdater/handlers/persistGameReleaseState.ts index d36f22563..28d884ab1 100755 --- a/apps/playnite-web/src/server/mqttUpdater/handlers/persistGameReleaseState.ts +++ b/apps/playnite-web/src/server/mqttUpdater/handlers/persistGameReleaseState.ts @@ -30,6 +30,11 @@ const create = const { state, release } = JSON.parse(payload.toString()) + if (release === null) { + debug('Release is null; aborting') + return + } + const newState = runStates.find((s) => s === state.toLowerCase()) if (!newState || !release.id) {