Skip to content

Commit

Permalink
handle null targetServiceAppData
Browse files Browse the repository at this point in the history
  • Loading branch information
rentallect committed Oct 21, 2024
1 parent 9117f4d commit 4da8791
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/context/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,11 @@ class ZitiContext extends EventEmitter {
this.targetService = options.target;
this.targetServiceAppData = await this.getConnectAppDataByServiceName (this.targetService.service, this.targetService.scheme);
this.targetServiceHost = await this.getConfigHostByServiceName (this.targetService.service);
this.targetServiceHostAndPort = `${this.targetServiceAppData.dst_hostname}:${this.targetServiceAppData.dst_port}`;
if (isUndefined(this.targetServiceAppData)) {
this.targetServiceHostAndPort = `n/a`;
} else {
this.targetServiceHostAndPort = `${this.targetServiceAppData.dst_hostname}:${this.targetServiceAppData.dst_port}`;
}
this.bootstrapperHost = options.bootstrapperHost;

this._initialized = true;
Expand Down

0 comments on commit 4da8791

Please sign in to comment.