diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js index 10244421..df48e275 100644 --- a/app/lib/rocketchat.js +++ b/app/lib/rocketchat.js @@ -84,7 +84,7 @@ const RocketChat = { } }, _hasInstanceId(headers) { - return !!Object.keys(headers).findIndex(item => item.toLowerCase() === 'x-instance-id'); + return !!headers[Object.keys(headers).find(item => item.toLowerCase() === 'x-instance-id')]; }, async testServer(url) { try {