From 7823b2da1265b41e96101a7c18d7fa5b26b3289b Mon Sep 17 00:00:00 2001 From: CosminPerRam Date: Mon, 1 Sep 2025 22:58:04 +0300 Subject: [PATCH] fix(core): reassign version to make sure the type is string (#735) * fix(core): reassign version to make sure the type is string * docs: update CHANGELOG.md * docs: update CHANGELOG.md --- CHANGELOG.md | 1 + protocols/core.js | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79cd2c4..1ff1e75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Feat: SCP: Secret Laboratory (2020) - Added support (#715, thanks @Draakoor) * Fix: Farming Simulator handle possible missing mod attribute (By @yellowfromseegg #723) * Fix: BeamMP would not match on given port (#730) +* Fix: version field would sometimes be a Number type (#735) ## 5.3.1 * Fix: HTTP requests would end up making more retries than needed due to got's internal retry mechanism (#690, thanks @RattleSN4K3) diff --git a/protocols/core.js b/protocols/core.js index fd92fac..5a874cd 100644 --- a/protocols/core.js +++ b/protocols/core.js @@ -89,6 +89,7 @@ export default class Core extends EventEmitter { state.name = (state.name || '').trim() state.connect = state.connect || `${state.gameHost || options.host || options.address}:${state.gamePort || options.port}` state.ping = this.shortestRTT + state.version = String(state.version) // #734 - we should eventually do this for the entire query schema delete state.gameHost delete state.gamePort