From 46b0eaef7e17483e69fc071e64a89db160100b40 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Tue, 2 Apr 2024 10:24:54 +0200 Subject: [PATCH] chore: fix bad "refactoring" in #8e2743fb --- packages/connector/src/connection/mosSocketClient.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/connector/src/connection/mosSocketClient.ts b/packages/connector/src/connection/mosSocketClient.ts index 38f22c78..4e04a0fe 100644 --- a/packages/connector/src/connection/mosSocketClient.ts +++ b/packages/connector/src/connection/mosSocketClient.ts @@ -440,8 +440,11 @@ export class MosSocketClient extends EventEmitter { private _getMessageId(parsedData: any, messageString: string): string | undefined { // If there is a messageID, just return it: - if (typeof parsedData.mos.messageID === 'string' && parsedData.mos.messageID !== '') - return parsedData.mos.messageID + if ( + (typeof parsedData.mos.messageID === 'string' || typeof parsedData.mos.messageID === 'number') && + parsedData.mos.messageID !== '' + ) + return `${parsedData.mos.messageID}` if (this._strict) { this.debugTrace(`Reply with no messageId: ${messageString}. Try non-strict mode.`)