Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
[Remote plugins] Call OnDidDeploy only if client is set
Browse files Browse the repository at this point in the history
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
  • Loading branch information
mmorhun committed Oct 23, 2019
1 parent 37395be commit 17e1a54
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type PromiseResolver = (value?: Buffer) => void;
@injectable()
export class HostedPluginRemote {

private client: HostedPluginClient;
private client: HostedPluginClient | undefined;

@inject(ILogger)
protected readonly logger: ILogger;
Expand Down Expand Up @@ -160,7 +160,9 @@ export class HostedPluginRemote {
const entryName = getPluginId(deployedPlugin.metadata.model);
if (!this.hostedPluginMapping.getPluginsEndPoints().has(entryName)) {
this.hostedPluginMapping.getPluginsEndPoints().set(entryName, jsonMessage.endpointName);
this.client.onDidDeploy();
if (this.client) {
this.client.onDidDeploy();
}
}
});
return;
Expand Down

0 comments on commit 17e1a54

Please sign in to comment.