diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js index 102444214..df48e2753 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 {