fix: Error Cannot read properties of undefined (reading 'sendTelemetry') (#3734)
fix Error: Cannot read properties of undefined (reading 'sendTelemetry')
This commit is contained in:
parent
bbe0203f4e
commit
e8a33e4d4d
|
|
@ -2,7 +2,11 @@ import * as Server from '../index'
|
||||||
|
|
||||||
export const getRunningExpressApp = function () {
|
export const getRunningExpressApp = function () {
|
||||||
const runningExpressInstance = Server.getInstance()
|
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!`)
|
throw new Error(`Error: getRunningExpressApp failed!`)
|
||||||
}
|
}
|
||||||
return runningExpressInstance
|
return runningExpressInstance
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue