Skip to content

Commit

Permalink
fix: do not override run state with incorrect data
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-codes committed Nov 13, 2024
1 parent cb14ff2 commit a7aaec8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const handler =
field: 'id',
value: entityId,
},
omit(merge({}, entity, { _type: entityType }), 'processId'),
omit(merge({}, entity, { _type: entityType }), 'processId', 'runState'),
)
} catch (e) {
console.error(e)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import createDebugger from 'debug'
import _ from 'lodash'
import { HandlerOptions } from '..'
import type { IHandlePublishedTopics } from '../IHandlePublishedTopics'

const debug = createDebugger(
'playnite-web/game-db-updater/handler/persistGameReleaseState',
)
const { merge } = _

const topicMatch = /^playnite\/.*\/response\/game\/state$/

Expand Down Expand Up @@ -92,7 +90,7 @@ const create =
options.pubsub.publish('releaseRunStateChanged', {
id: release.id,
gameId: release.gameId,
processId: release.processId ?? null,
processId: release.processId ?? null,
runState: newState,
})
} catch (e) {
Expand Down

0 comments on commit a7aaec8

Please sign in to comment.