fix(mixins/HttpProxy): don't fail on missing httpServer
Introduced by 98641631a
Similar to bc7fc750f
Which is the case when instanciated from `xo-server-recover-account`.
This commit is contained in:
@@ -30,6 +30,13 @@ module.exports = class HttpProxy {
|
||||
#app
|
||||
|
||||
constructor(app, { httpServer }) {
|
||||
// don't setup the proxy if httpServer is not present
|
||||
//
|
||||
// that can happen when the app is instanciated in another context like xo-server-recover-account
|
||||
if (httpServer === undefined) {
|
||||
return
|
||||
}
|
||||
|
||||
this.#app = app
|
||||
|
||||
const events = new EventListenersManager(httpServer)
|
||||
|
||||
@@ -28,4 +28,5 @@
|
||||
>
|
||||
> In case of conflict, the highest (lowest in previous list) `$version` wins.
|
||||
|
||||
- @xen-orchestra/mixins patch
|
||||
- xo-server patch
|
||||
|
||||
Reference in New Issue
Block a user