Skip to content

Commit

Permalink
fix: Error Cannot read properties of undefined (reading 'sendTelemetr…
Browse files Browse the repository at this point in the history
…y') (#3734)

fix Error: Cannot read properties of undefined (reading 'sendTelemetry')
  • Loading branch information
karlobencic authored Dec 21, 2024
1 parent bbe0203 commit e8a33e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/server/src/utils/getRunningExpressApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import * as Server from '../index'

export const getRunningExpressApp = function () {
const runningExpressInstance = Server.getInstance()
if (typeof runningExpressInstance === 'undefined' || typeof runningExpressInstance.nodesPool === 'undefined') {
if (
typeof runningExpressInstance === 'undefined' ||
typeof runningExpressInstance.nodesPool === 'undefined' ||
typeof runningExpressInstance.telemetry === 'undefined'
) {
throw new Error(`Error: getRunningExpressApp failed!`)
}
return runningExpressInstance
Expand Down

0 comments on commit e8a33e4

Please sign in to comment.